!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.livemeshWaypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.livemeshWaypoint=t(window.Zepto))}(); (function(window,document,undefined){var classes=[];var tests=[];var ModernizrProto={_version:"3.3.1",_config:{classPrefix:"lvca-",enableClasses:true,enableJSClass:true,usePrefixes:true},_q:[],on:function(test,cb){var self=this;setTimeout(function(){cb(self[test])},0)},addTest:function(name,fn,options){tests.push({name:name,fn:fn,options:options})},addAsyncTest:function(fn){tests.push({name:null,fn:fn})}};var Modernizr=function(){};Modernizr.prototype=ModernizrProto;Modernizr=new Modernizr;function is(obj,type){return typeof obj===type}function testRunner(){var featureNames;var feature;var aliasIdx;var result;var nameIdx;var featureName;var featureNameSplit;for(var featureIdx in tests){if(tests.hasOwnProperty(featureIdx)){featureNames=[];feature=tests[featureIdx];if(feature.name){featureNames.push(feature.name.toLowerCase());if(feature.options&&feature.options.aliases&&feature.options.aliases.length){for(aliasIdx=0;aliasIdx";supportsHtml5Styles="hidden"in a;supportsUnknownElements=a.childNodes.length==1||function(){document.createElement("a");var frag=document.createDocumentFragment();return typeof frag.cloneNode=="undefined"||typeof frag.createDocumentFragment=="undefined"||typeof frag.createElement=="undefined"}()}catch(e){supportsHtml5Styles=true;supportsUnknownElements=true}})();function addStyleSheet(ownerDocument,cssText){var p=ownerDocument.createElement("p"),parent=ownerDocument.getElementsByTagName("head")[0]||ownerDocument.documentElement;p.innerHTML="x";return parent.insertBefore(p.lastChild,parent.firstChild)}function getElements(){var elements=html5.elements;return typeof elements=="string"?elements.split(" "):elements}function addElements(newElements,ownerDocument){var elements=html5.elements;if(typeof elements!="string"){elements=elements.join(" ")}if(typeof newElements!="string"){newElements=newElements.join(" ")}html5.elements=elements+" "+newElements;shivDocument(ownerDocument)}function getExpandoData(ownerDocument){var data=expandoData[ownerDocument[expando]];if(!data){data={};expanID++;ownerDocument[expando]=expanID;expandoData[expanID]=data}return data}function createElement(nodeName,ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createElement(nodeName)}if(!data){data=getExpandoData(ownerDocument)}var node;if(data.cache[nodeName]){node=data.cache[nodeName].cloneNode()}else if(saveClones.test(nodeName)){node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode()}else{node=data.createElem(nodeName)}return node.canHaveChildren&&!reSkip.test(nodeName)&&!node.tagUrn?data.frag.appendChild(node):node}function createDocumentFragment(ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createDocumentFragment()}data=data||getExpandoData(ownerDocument);var clone=data.frag.cloneNode(),i=0,elems=getElements(),l=elems.length;for(;i'+custom_css+"";$("head").append(custom_css)}},setup_animations:function(){$(".lvca-visible-on-scroll:not(.animated)").css("opacity",0);"function"!=typeof window.lvca_animate_widgets&&(window.lvca_animate_widgets=function(){"undefined"!=typeof $.fn.livemeshWaypoint&&$(".lvca-animate-on-scroll:not(.animated)").livemeshWaypoint(function(){var animateClass=$(this.element).data("animation");$(this.element).addClass("animated "+animateClass).css("opacity",1)},{offset:"85%"})});window.setTimeout(lvca_animate_widgets,500)},carousel:function(){if($().slick===undefined){return}var carousel_elements=$(".lvca-carousel, .lvca-posts-carousel, .lvca-gallery-carousel");carousel_elements.each(function(){var carousel_elem=$(this);var settings=carousel_elem.data("settings");var arrows=settings["arrows"]?true:false;var dots=settings["dots"]?true:false;var autoplay=settings["autoplay"]?true:false;var autoplay_speed=parseInt(settings["autoplay_speed"])||3e3;var animation_speed=parseInt(settings["animation_speed"])||300;var fade=settings["fade"]?true:false;var pause_on_hover=settings["pause_on_hover"]?true:false;var display_columns=parseInt(settings["display_columns"])||4;var scroll_columns=parseInt(settings["scroll_columns"])||4;var tablet_width=parseInt(settings["tablet_width"])||800;var tablet_display_columns=parseInt(settings["tablet_display_columns"])||2;var tablet_scroll_columns=parseInt(settings["tablet_scroll_columns"])||2;var mobile_width=parseInt(settings["mobile_width"])||480;var mobile_display_columns=parseInt(settings["mobile_display_columns"])||1;var mobile_scroll_columns=parseInt(settings["mobile_scroll_columns"])||1;carousel_elem.slick({arrows:arrows,dots:dots,infinite:true,autoplay:autoplay,autoplaySpeed:autoplay_speed,speed:animation_speed,fade:false,pauseOnHover:pause_on_hover,slidesToShow:display_columns,slidesToScroll:scroll_columns,responsive:[{breakpoint:tablet_width,settings:{slidesToShow:tablet_display_columns,slidesToScroll:tablet_scroll_columns}},{breakpoint:mobile_width,settings:{slidesToShow:mobile_display_columns,slidesToScroll:mobile_scroll_columns}}]})})}};LVCA_Frontend.init()})})(jQuery)}; (function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$('
    '); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); (function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var y="1.6.9",p="left",o="right",e="up",x="down",c="in",A="out",m="none",s="auto",l="swipe",t="pinch",B="tap",j="doubletap",b="longtap",z="hold",E="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,C="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:true};f.fn.swipetp=function(H){var G=f(this),F=G.data(C);if(F&&typeof H==="string"){if(F[H]){return F[H].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+H+" does not exist on jQuery.swipetp")}}else{if(!F&&(typeof H==="object"||!H)){return w.apply(this,arguments)}}return G};f.fn.swipetp.version=y;f.fn.swipetp.defaults=n;f.fn.swipetp.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipetp.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:A};f.fn.swipetp.pageScroll={NONE:m,HORIZONTAL:E,VERTICAL:u,AUTO:s};f.fn.swipetp.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(F){if(F&&(F.allowPageScroll===undefined&&(F.swipe!==undefined||F.swipeStatus!==undefined))){F.allowPageScroll=m}if(F.click!==undefined&&F.tap===undefined){F.tap=F.click}if(!F){F={}}F=f.extend({},f.fn.swipetp.defaults,F);return this.each(function(){var H=f(this);var G=H.data(C);if(!G){G=new D(this,F);H.data(C,G)}})}function D(a5,aw){var aA=(a||d||!aw.fallbackToMouseEvents),K=aA?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",az=aA?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",V=aA?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",T=aA?null:"mouseleave",aE=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ah=0,aQ=null,ac=0,a2=0,a0=0,H=1,ar=0,aK=0,N=null;var aS=f(a5);var aa="start";var X=0;var aR=null;var U=0,a3=0,a6=0,ae=0,O=0;var aX=null,ag=null;try{aS.bind(K,aO);aS.bind(aE,ba)}catch(al){f.error("events not supported "+K+","+aE+" on jQuery.swipetp")}this.enable=function(){aS.bind(K,aO);aS.bind(aE,ba);return aS};this.disable=function(){aL();return aS};this.destroy=function(){aL();aS.data(C,null);aS=null};this.option=function(bd,bc){if(aw[bd]!==undefined){if(bc===undefined){return aw[bd]}else{aw[bd]=bc}}else{f.error("Option "+bd+" does not exist on jQuery.swipetp.options")}return null};function aO(be){if(aC()){return}if(f(be.target).closest(aw.excludedElements,aS).length>0){return}var bf=be.originalEvent?be.originalEvent:be;var bd,bg=bf.touches,bc=bg?bg[0]:bf;aa=g;if(bg){X=bg.length}else{be.preventDefault()}ah=0;aQ=null;aK=null;ac=0;a2=0;a0=0;H=1;ar=0;aR=ak();N=ab();S();if(!bg||(X===aw.fingers||aw.fingers===i)||aY()){aj(0,bc);U=au();if(X==2){aj(1,bg[1]);a2=a0=av(aR[0].start,aR[1].start)}if(aw.swipeStatus||aw.pinchStatus){bd=P(bf,aa)}}else{bd=false}if(bd===false){aa=q;P(bf,aa);return bd}else{if(aw.hold){ag=setTimeout(f.proxy(function(){aS.trigger("hold",[bf.target]);if(aw.hold){bd=aw.hold.call(aS,bf,bf.target)}},this),aw.longTapThreshold)}ap(true)}return null}function a4(bf){var bi=bf.originalEvent?bf.originalEvent:bf;if(aa===h||aa===q||an()){return}var be,bj=bi.touches,bd=bj?bj[0]:bi;var bg=aI(bd);a3=au();if(bj){X=bj.length}if(aw.hold){clearTimeout(ag)}aa=k;if(X==2){if(a2==0){aj(1,bj[1]);a2=a0=av(aR[0].start,aR[1].start)}else{aI(bj[1]);a0=av(aR[0].end,aR[1].end);aK=at(aR[0].end,aR[1].end)}H=a8(a2,a0);ar=Math.abs(a2-a0)}if((X===aw.fingers||aw.fingers===i)||!bj||aY()){aQ=aM(bg.start,bg.end);am(bf,aQ);ah=aT(bg.start,bg.end);ac=aN();aJ(aQ,ah);if(aw.swipeStatus||aw.pinchStatus){be=P(bi,aa)}if(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave){var bc=true;if(aw.triggerOnTouchLeave){var bh=aZ(this);bc=F(bg.end,bh)}if(!aw.triggerOnTouchEnd&&bc){aa=aD(k)}else{if(aw.triggerOnTouchLeave&&!bc){aa=aD(h)}}if(aa==q||aa==h){P(bi,aa)}}}else{aa=q;P(bi,aa)}if(be===false){aa=q;P(bi,aa)}}function M(bc){var bd=bc.originalEvent?bc.originalEvent:bc,be=bd.touches;if(be){if(be.length){G();return true}}if(an()){X=ae}a3=au();ac=aN();if(bb()||!ao()){aa=q;P(bd,aa)}else{if(aw.triggerOnTouchEnd||(aw.triggerOnTouchEnd==false&&aa===k)){bc.preventDefault();aa=h;P(bd,aa)}else{if(!aw.triggerOnTouchEnd&&a7()){aa=h;aG(bd,aa,B)}else{if(aa===k){aa=q;P(bd,aa)}}}}ap(false);return null}function ba(){X=0;a3=0;U=0;a2=0;a0=0;H=1;S();ap(false)}function L(bc){var bd=bc.originalEvent?bc.originalEvent:bc;if(aw.triggerOnTouchLeave){aa=aD(h);P(bd,aa)}}function aL(){aS.unbind(K,aO);aS.unbind(aE,ba);aS.unbind(az,a4);aS.unbind(V,M);if(T){aS.unbind(T,L)}ap(false)}function aD(bg){var bf=bg;var be=aB();var bd=ao();var bc=bb();if(!be||bc){bf=q}else{if(bd&&bg==k&&(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave)){bf=h}else{if(!bd&&bg==h&&aw.triggerOnTouchLeave){bf=q}}}return bf}function P(be,bc){var bd,bf=be.touches;if((J()||W())||(Q()||aY())){if(J()||W()){bd=aG(be,bc,l)}if((Q()||aY())&&bd!==false){bd=aG(be,bc,t)}}else{if(aH()&&bd!==false){bd=aG(be,bc,j)}else{if(aq()&&bd!==false){bd=aG(be,bc,b)}else{if(ai()&&bd!==false){bd=aG(be,bc,B)}}}}if(bc===q){ba(be)}if(bc===h){if(bf){if(!bf.length){ba(be)}}else{ba(be)}}return bd}function aG(bf,bc,be){var bd;if(be==l){aS.trigger("swipeStatus",[bc,aQ||null,ah||0,ac||0,X,aR]);if(aw.swipeStatus){bd=aw.swipeStatus.call(aS,bf,bc,aQ||null,ah||0,ac||0,X,aR);if(bd===false){return false}}if(bc==h&&aW()){aS.trigger("swipe",[aQ,ah,ac,X,aR]);if(aw.swipe){bd=aw.swipe.call(aS,bf,aQ,ah,ac,X,aR);if(bd===false){return false}}switch(aQ){case p:aS.trigger("swipeLeft",[aQ,ah,ac,X,aR]);if(aw.swipeLeft){bd=aw.swipeLeft.call(aS,bf,aQ,ah,ac,X,aR)}break;case o:aS.trigger("swipeRight",[aQ,ah,ac,X,aR]);if(aw.swipeRight){bd=aw.swipeRight.call(aS,bf,aQ,ah,ac,X,aR)}break;case e:aS.trigger("swipeUp",[aQ,ah,ac,X,aR]);if(aw.swipeUp){bd=aw.swipeUp.call(aS,bf,aQ,ah,ac,X,aR)}break;case x:aS.trigger("swipeDown",[aQ,ah,ac,X,aR]);if(aw.swipeDown){bd=aw.swipeDown.call(aS,bf,aQ,ah,ac,X,aR)}break}}}if(be==t){aS.trigger("pinchStatus",[bc,aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchStatus){bd=aw.pinchStatus.call(aS,bf,bc,aK||null,ar||0,ac||0,X,H,aR);if(bd===false){return false}}if(bc==h&&a9()){switch(aK){case c:aS.trigger("pinchIn",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchIn){bd=aw.pinchIn.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break;case A:aS.trigger("pinchOut",[aK||null,ar||0,ac||0,X,H,aR]);if(aw.pinchOut){bd=aw.pinchOut.call(aS,bf,aK||null,ar||0,ac||0,X,H,aR)}break}}}if(be==B){if(bc===q||bc===h){clearTimeout(aX);clearTimeout(ag);if(Z()&&!I()){O=au();aX=setTimeout(f.proxy(function(){O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}},this),aw.doubleTapThreshold)}else{O=null;aS.trigger("tap",[bf.target]);if(aw.tap){bd=aw.tap.call(aS,bf,bf.target)}}}}else{if(be==j){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("doubletap",[bf.target]);if(aw.doubleTap){bd=aw.doubleTap.call(aS,bf,bf.target)}}}else{if(be==b){if(bc===q||bc===h){clearTimeout(aX);O=null;aS.trigger("longtap",[bf.target]);if(aw.longTap){bd=aw.longTap.call(aS,bf,bf.target)}}}}}return bd}function ao(){var bc=true;if(aw.threshold!==null){bc=ah>=aw.threshold}return bc}function bb(){var bc=false;if(aw.cancelThreshold!==null&&aQ!==null){bc=(aU(aQ)-ah)>=aw.cancelThreshold}return bc}function af(){if(aw.pinchThreshold!==null){return ar>=aw.pinchThreshold}return true}function aB(){var bc;if(aw.maxTimeThreshold){if(ac>=aw.maxTimeThreshold){bc=false}else{bc=true}}else{bc=true}return bc}function am(bc,bd){if(aw.preventDefaultEvents===false){return}if(aw.allowPageScroll===m){bc.preventDefault()}else{var be=aw.allowPageScroll===s;switch(bd){case p:if((aw.swipeLeft&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case o:if((aw.swipeRight&&be)||(!be&&aw.allowPageScroll!=E)){bc.preventDefault()}break;case e:if((aw.swipeUp&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break;case x:if((aw.swipeDown&&be)||(!be&&aw.allowPageScroll!=u)){bc.preventDefault()}break}}}function a9(){var bd=aP();var bc=Y();var be=af();return bd&&bc&&be}function aY(){return !!(aw.pinchStatus||aw.pinchIn||aw.pinchOut)}function Q(){return !!(a9()&&aY())}function aW(){var bf=aB();var bh=ao();var be=aP();var bc=Y();var bd=bb();var bg=!bd&&bc&&be&&bh&&bf;return bg}function W(){return !!(aw.swipe||aw.swipeStatus||aw.swipeLeft||aw.swipeRight||aw.swipeUp||aw.swipeDown)}function J(){return !!(aW()&&W())}function aP(){return((X===aw.fingers||aw.fingers===i)||!a)}function Y(){return aR[0].end.x!==0}function a7(){return !!(aw.tap)}function Z(){return !!(aw.doubleTap)}function aV(){return !!(aw.longTap)}function R(){if(O==null){return false}var bc=au();return(Z()&&((bc-O)<=aw.doubleTapThreshold))}function I(){return R()}function ay(){return((X===1||!a)&&(isNaN(ah)||ahaw.longTapThreshold)&&(ah=0)){return p}else{if((be<=360)&&(be>=315)){return p}else{if((be>=135)&&(be<=225)){return o}else{if((be>45)&&(be<135)){return x}else{return e}}}}}function au(){var bc=new Date();return bc.getTime()}function aZ(bc){bc=f(bc);var be=bc.offset();var bd={left:be.left,right:be.left+bc.outerWidth(),top:be.top,bottom:be.top+bc.outerHeight()};return bd}function F(bc,bd){return(bc.x>bd.left&&bc.xbd.top&&bc.y-1;)(l=q[f[s]]||new r(f[s],[])).gsClass?(i[s]=l.gsClass,t--):j&&l.sc.push(this);if(0===t&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,p="undefined"!=typeof module&&module.exports,!p&&"function"==typeof define&&define.amd)define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});else if(p)if(d===b){module.exports=c[b]=o;for(s in c)o[s]=c[s]}else c[b]&&(c[b][n]=o);for(s=0;s-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){p=a||1/m,q=Math.min(b,p,0)},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==d.visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,W){j||i.wake();var c=this.vars.useFrames?V:W;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&i.wake(),setTimeout(E,2e3)};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Y(),this.render(a,b,!1),J.length&&Y())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||m,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?U[G.defaultOverwrite]:"number"==typeof i?i>>0:U[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e1&&_(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Z(b,this,!1),1===i&&this._siblings.length>1&&_(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)T[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!Q[c]||Q[c]&&Q[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.19.1",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof d?b:d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},N=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=M,l},O=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=N(m,n?o.s+o.c:d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},P=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:N},Q=G._plugins={},R=P.tweenLookup={},S=0,T=P.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},V=D._rootFramesTimeline=new F,W=D._rootTimeline=new F,X=30,Y=P.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};W._startTime=i.time,V._startTime=i.frame,W._active=V._active=!0,setTimeout(Y,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Y(),W.render((i.time-W._startTime)*W._timeScale,!1,!1),V.render((i.frame-V._startTime)*V._timeScale,!1,!1),J.length&&Y(),i.frame>=X){X=i.frame+(parseInt(G.autoSleep,10)||120);for(c in R){for(b=R[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete R[c]}if(c=W._first,(!c||c._paused)&&G.autoSleep&&!V._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var Z=function(a,b,c){var d,e,f=a._gsTweenID;if(R[f||(a._gsTweenID=f="t"+S++)]||(R[f]={target:a,tweens:[]}),b&&(d=R[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return R[f].tweens},$=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},_=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||aa(b,0,o),0===aa(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!$(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},aa=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,this._startAt=G.to(this.target,0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)T[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Y(),this.vars.css||b.style&&b!==a&&b.nodeType&&Q.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],T[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(Q[g]&&(j=new Q[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=O.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&_(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!$(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=Z(d[c],this,!0);else this._siblings=Z(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=Z(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ba=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ba.prototype},!0);if(h=ba.prototype,ba.version="1.19.0",ba.API=2,h._firstPT=null,h._addTween=O,h.setRatio=M,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ba.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ba.API&&(Q[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ba.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ba(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ba.activate([g]),g},f=a._gsQueue){for(g=0;gt._rawPrevTime||0===t._rawPrevTime&&a._reversed,_=l?0:r,f=l?r:0;if(e||!this._forcingPlayhead){for(a.pause(h),n=t._prev;n&&n._startTime===h;)n._rawPrevTime=f,n=n._prev;for(n=t._next;n&&n._startTime===h;)n._rawPrevTime=_,n=n._next;e&&e.apply(s||a.vars.callbackScope||a,i||u),(this._forcingPlayhead||!a._paused)&&a.seek(o)}},m=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},d=s.prototype=new e;return s.version="1.17.0",d.constructor=s,d.kill()._gc=d._forcingPlayhead=!1,d.to=function(t,e,s,r){var n=s.repeat&&f.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},d.from=function(t,e,s,r){return this.add((s.repeat&&f.TweenMax||i).from(t,e,s),r)},d.fromTo=function(t,e,s,r,n){var a=r.repeat&&f.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},d.staggerTo=function(t,e,r,n,a,h,l,_){var u,f=new s({onComplete:h,onCompleteParams:l,callbackScope:_,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=i.selector(t)||t),t=t||[],o(t)&&(t=m(t)),n=n||0,0>n&&(t=m(t),t.reverse(),n*=-1),u=0;t.length>u;u++)r.startAt&&(r.startAt=c(r.startAt)),f.to(t[u],e,c(r),u*n);return this.add(f,a)},d.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},d.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},d.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},d.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},d.add=function(r,n,a,o){var l,_,u,f,c,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&h(r)){for(a=a||"normal",o=o||0,l=n,_=r.length,u=0;_>u;u++)h(f=r[u])&&(f=new s({tweens:f})),this.add(f,l),"string"!=typeof f&&"function"!=typeof f&&("sequence"===a?l=f._startTime+f.totalDuration()/f._timeScale:"start"===a&&(f._startTime-=f.delay())),l+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._durationr._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},d.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array||e&&e.push&&h(e)){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},d._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},d.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},d.insert=d.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},d.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},d.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},d.addPause=function(t,e,s,r){var n=i.delayedCall(0,p,["{self}",e,s,r],this);return n.data="isPause",this.add(n,t)},d.removeLabel=function(t){return delete this._labels[t],this},d.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},d._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&h(r)))for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(n=e.indexOf("="),-1===n)return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},d.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},d.stop=function(){return this.paused(!0)},d.gotoAndPlay=function(t,e){return this.play(t,e)},d.gotoAndStop=function(t,e){return this.pause(t,e)},d.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,h,u=this._dirty?this.totalDuration():this._totalDuration,f=this._time,c=this._startTime,p=this._timeScale,m=this._paused;if(t>=u)this._totalTime=this._time=u,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",h=!!this._timeline.autoRemoveChildren,0===this._duration&&(0===t||0>this._rawPrevTime||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(h=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=u+1e-4;else if(1e-7>t)if(this._totalTime=this._time=0,(0!==f||0===this._duration&&this._rawPrevTime!==r&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(o="onReverseComplete",n=this._reversed),0>t)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(h=n=!0,o="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(h=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,0===t&&n)for(s=this._first;s&&0===s._startTime;)s._duration||(n=!1),s=s._next;t=0,this._initted||(h=!0)}else this._totalTime=this._time=this._rawPrevTime=t;if(this._time!==f&&this._first||i||h){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==f&&t>0&&(this._active=!0),0===f&&this.vars.onStart&&0!==this._time&&(e||this._callback("onStart")),this._time>=f)for(s=this._first;s&&(a=s._next,!this._paused||m);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||m);)(s._active||f>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||(l.length&&_(),this._callback("onUpdate"))),o&&(this._gc||(c===this._startTime||p!==this._timeScale)&&(0===this._time||u>=this.totalDuration())&&(n&&(l.length&&_(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this._callback(o)))}},d._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},d.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)r>a._startTime||(a instanceof i?e!==!1&&(n[o++]=a):(s!==!1&&(n[o++]=a),t!==!1&&(n=n.concat(a.getChildren(!0,e,s)),o=n.length))),a=a._next;return n},d.getTweensOf=function(t,e){var s,r,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=i.getTweensOf(t),r=s.length;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(a[o++]=s[r]);return n&&this._enabled(!1,!0),a},d.recent=function(){return this._recent},d._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},d.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},d._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},d.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},d.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},d._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},d.totalTime=function(){this._forcingPlayhead=!0;var e=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},d.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},d.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,0>r._startTime&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),i=r._startTime+r._totalDuration/r._timeScale,i>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},d.paused=function(e){if(!e)for(var i=this._first,s=this._time;i;)i._startTime===s&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},d.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},d.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope)[t]};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(require("./TweenLite.js"),module.exports=e())}("TimelineLite"); var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return athis._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(){"use strict";var a=function(){return _gsScope.GreenSockGlobals||_gsScope};"function"==typeof define&&define.amd?define(["TweenLite"],a):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=a())}(); var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.19.1",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *=*([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=O.defaultView?O.defaultView.getComputedStyle:function(){},_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(a[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h=f.length?"":a;for(c=0;c0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;nn--)for(;++nm--)for(;++mi;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod(h.rotation,this.t):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" "),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m],x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px"),!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(y?"hsla(":"hsl(",p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(y?"rgba(":"rgb(",p[0],u[0]-p[0],",",!0,!0).appendXtra("",p[1],u[1]-p[1],",",!0).appendXtra("",p[2],u[2]-p[2],y?",":B,!0),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;dh.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!(Ha&&a.getCTM&&Na(a))||a.parentNode&&!a.ownerSVGElement)},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,c&&Ca&&((h="none"===$(a).display)||!a.parentNode)&&(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(-1!==e.indexOf("matrix")?(d=e,c=0):-1!==e.indexOf("translate")&&(d="matrix(1,0,0,1,"+e.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",c=0))),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),x=x*v+B*w,t=y*v+C*w,C=y*-w+C*v,D=z*-w+D*v,y=t),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),m.scaleX=(Math.sqrt(x*x+y*y)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+G*G)*p+.5|0)/p,m.scaleZ=(Math.sqrt(D*D+H*H)*p+.5|0)/p,m.rotationX||m.rotationY?m.skewX=0:(m.skewX=B||C?Math.atan2(B,C)*L+m.rotation:m.skewX||0,Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180))),m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,Math.abs(l)>90&&Math.abs(l)<270&&(n?(i*=-1,l+=0>=k?180:-180,k+=0>=k?180:-180):(j*=-1,l+=0>=l?180:-180)),m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}m.zOrigin=q;for(h in m)m[h]-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",O.body.appendChild(Q),l=Ra(Q,null,!1),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent),yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),D.skewType=A.skewType||D.skewType||g.defaultSkewType,n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;jp?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")", b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b)n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g],h?c=h.parse(a,n,g,this,c,f,b):(m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))),f&&c&&!c.plugin&&(c.plugin=f);return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define(["TweenLite"],b):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=b())}("CSSPlugin"); var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;!function(a){"use strict";var b=a.GreenSockGlobals||a,c=function(a){var c,d=a.split("."),e=b;for(c=0;cb;b++)if(c=a[b],j(c))for(d=c.length,d=0;d":">")}},y=d.SplitText=b.SplitText=function(a,b){if("string"==typeof a&&(a=y.selector(a)),!a)throw"cannot split a null element.";this.elements=j(a)?k(a):[a],this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=b||{},this.split(b)},z=function(a,b,c){var d=a.nodeType;if(1===d||9===d||11===d)for(a=a.firstChild;a;a=a.nextSibling)z(a,b,c);else(3===d||4===d)&&(a.nodeValue=a.nodeValue.split(b).join(c))},A=function(a,b){for(var c=b.length;--c>-1;)a.push(b[c])},B=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},C=function(a,b,c){for(var d;a&&a!==b;){if(d=a._next||a.nextSibling)return d.textContent.charAt(0)===c;a=a.parentNode||a._parent}return!1},D=function(a){var b,c,d=B(a.childNodes),e=d.length;for(b=0;e>b;b++)c=d[b],c._isSplit?D(c):(b&&3===c.previousSibling.nodeType?c.previousSibling.nodeValue+=3===c.nodeType?c.nodeValue:c.firstChild.nodeValue:3!==c.nodeType&&a.insertBefore(c.firstChild,c),a.removeChild(c))},E=function(a,b,c,d,e,h,j){var k,l,m,n,o,p,q,r,s,t,u,v,w=g(a),x=i(a,"paddingLeft",w),y=-999,B=i(a,"borderBottomWidth",w)+i(a,"borderTopWidth",w),E=i(a,"borderLeftWidth",w)+i(a,"borderRightWidth",w),F=i(a,"paddingTop",w)+i(a,"paddingBottom",w),G=i(a,"paddingLeft",w)+i(a,"paddingRight",w),H=.2*i(a,"fontSize"),I=i(a,"textAlign",w,!0),J=[],K=[],L=[],M=b.wordDelimiter||" ",N=b.span?"span":"div",O=b.type||b.split||"chars,words,lines",P=e&&-1!==O.indexOf("lines")?[]:null,Q=-1!==O.indexOf("words"),R=-1!==O.indexOf("chars"),S="absolute"===b.position||b.absolute===!0,T=b.linesClass,U=-1!==(T||"").indexOf("++"),V=[];for(P&&1===a.children.length&&a.children[0]._isSplit&&(a=a.children[0]),U&&(T=T.split("++").join("")),l=a.getElementsByTagName("*"),m=l.length,o=[],k=0;m>k;k++)o[k]=l[k];if(P||S)for(k=0;m>k;k++)n=o[k],p=n.parentNode===a,(p||S||R&&!Q)&&(v=n.offsetTop,P&&p&&Math.abs(v-y)>H&&"BR"!==n.nodeName&&(q=[],P.push(q),y=v),S&&(n._x=n.offsetLeft,n._y=v,n._w=n.offsetWidth,n._h=n.offsetHeight),P&&((n._isSplit&&p||!R&&p||Q&&p||!Q&&n.parentNode.parentNode===a&&!n.parentNode._isSplit)&&(q.push(n),n._x-=x,C(n,a,M)&&(n._wordEnd=!0)),"BR"===n.nodeName&&n.nextSibling&&"BR"===n.nextSibling.nodeName&&P.push([])));for(k=0;m>k;k++)n=o[k],p=n.parentNode===a,"BR"!==n.nodeName?(S&&(s=n.style,Q||p||(n._x+=n.parentNode._x,n._y+=n.parentNode._y),s.left=n._x+"px",s.top=n._y+"px",s.position="absolute",s.display="block",s.width=n._w+1+"px",s.height=n._h+"px"),!Q&&R?n._isSplit?(n._next=n.nextSibling,n.parentNode.appendChild(n)):n.parentNode._isSplit?(n._parent=n.parentNode,!n.previousSibling&&n.firstChild&&(n.firstChild._isFirst=!0),n.nextSibling&&" "===n.nextSibling.textContent&&!n.nextSibling.nextSibling&&V.push(n.nextSibling),n._next=n.nextSibling&&n.nextSibling._isFirst?null:n.nextSibling,n.parentNode.removeChild(n),o.splice(k--,1),m--):p||(v=!n.nextSibling&&C(n.parentNode,a,M),n.parentNode._parent&&n.parentNode._parent.appendChild(n),v&&n.parentNode.appendChild(f.createTextNode(" ")),b.span&&(n.style.display="inline"),J.push(n)):n.parentNode._isSplit&&!n._isSplit&&""!==n.innerHTML?K.push(n):R&&!n._isSplit&&(b.span&&(n.style.display="inline"),J.push(n))):P||S?(n.parentNode&&n.parentNode.removeChild(n),o.splice(k--,1),m--):Q||a.appendChild(n);for(k=V.length;--k>-1;)V[k].parentNode.removeChild(V[k]);if(P){for(S&&(t=f.createElement(N),a.appendChild(t),u=t.offsetWidth+"px",v=t.offsetParent===a?0:a.offsetLeft,a.removeChild(t)),s=a.style.cssText,a.style.cssText="display:none;";a.firstChild;)a.removeChild(a.firstChild);for(r=" "===M&&(!S||!Q&&!R),k=0;kl;l++)"BR"!==q[l].nodeName&&(n=q[l],t.appendChild(n),r&&n._wordEnd&&t.appendChild(f.createTextNode(" ")),S&&(0===l&&(t.style.top=n._y+"px",t.style.left=x+v+"px"),n.style.top="0px",v&&(n.style.left=n._x-v+"px")));0===m?t.innerHTML=" ":Q||R||(D(t),z(t,String.fromCharCode(160)," ")),S&&(t.style.width=u,t.style.height=n._h+"px"),a.appendChild(t)}a.style.cssText=s}S&&(j>a.clientHeight&&(a.style.height=j-F+"px",a.clientHeighta.clientWidth&&(a.style.width=h-G+"px",a.clientWidth":"",G=!0,H=f.createElement("div"),I=a.parentNode;for(I.insertBefore(H,a),H.textContent=a.nodeValue,I.removeChild(a),a=H,g=e(a),v=-1!==g.indexOf("<"),b.reduceWhiteSpace!==!1&&(g=g.replace(m," ").replace(l,"")),v&&(g=g.split("<").join("{{LT}}")),k=g.length,h=(" "===g.charAt(0)?E:"")+c(),i=0;k>i;i++)if(p=g.charAt(i),p===D&&g.charAt(i-1)!==D&&i){for(h+=G?F:"",G=!1;g.charAt(i+1)===D;)h+=E,i++;i===k-1?h+=E:")"!==g.charAt(i+1)&&(h+=E+c(),G=!0)}else"{"===p&&"{{LT}}"===g.substr(i,6)?(h+=B?d()+"{{LT}}":"{{LT}}",i+=5):p.charCodeAt(0)>=n&&p.charCodeAt(0)<=o||g.charCodeAt(i+1)>=65024&&g.charCodeAt(i+1)<=65039?(w=u(g.substr(i,2)),x=u(g.substr(i+2,2)),j=w>=q&&r>=w&&x>=q&&r>=x||x>=s&&t>=x?4:2,h+=B&&" "!==p?d()+g.substr(i,j)+"":g.substr(i,j),i+=j-1):h+=B&&" "!==p?d()+p+"":p;a.outerHTML=h+(G?F:""),v&&z(I,"{{LT}}","<")},G=function(a,b,c,d){var e,f,g=B(a.childNodes),h=g.length,j="absolute"===b.position||b.absolute===!0;if(3!==a.nodeType||h>1){for(b.absolute=!1,e=0;h>e;e++)f=g[e],(3!==f.nodeType||/\S+/.test(f.nodeValue))&&(j&&3!==f.nodeType&&"inline"===i(f,"display",null,!0)&&(f.style.display="inline-block",f.style.position="relative"),f._isSplit=!0,G(f,b,c,d));return b.absolute=j,void(a._isSplit=!0)}F(a,b,c,d)},H=y.prototype;H.split=function(a){this.isSplit&&this.revert(),this.vars=a=a||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var b,c,d,e=this.elements.length,f=a.span?"span":"div",g=("absolute"===a.position||a.absolute===!0,x(a.wordsClass,f)),h=x(a.charsClass,f);--e>-1;)d=this.elements[e],this._originals[e]=d.innerHTML,b=d.clientHeight,c=d.clientWidth,G(d,a,g,h),E(d,a,this.chars,this.words,this.lines,c,b);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this},H.revert=function(){if(!this._originals)throw"revert() call wasn't scoped properly.";for(var a=this._originals.length;--a>-1;)this.elements[a].innerHTML=this._originals[a];return this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this},y.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(y.selector=c,c(b)):"undefined"==typeof document?b:document.querySelectorAll?document.querySelectorAll(b):document.getElementById("#"===b.charAt(0)?b.substr(1):b)},y.version="0.5.6"}(_gsScope),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports&&(module.exports=b())}("SplitText"); try{ window.GreenSockGlobals=null; window._gsQueue=null; window._gsDefine=null; delete(window.GreenSockGlobals); delete(window._gsQueue); delete(window._gsDefine); } catch(e){} try{ window.GreenSockGlobals=oldgs; window._gsQueue=oldgs_queue; } catch(e){} if(window.tplogs==true) try { console.groupEnd(); } catch(e){} (function(e,t){ e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]};e.expr[":"].uncached=function(t){var n=document.createElement("img");n.src=t.src;return e(t).is('img[src!=""]')&&!n.complete};e.fn.waitForImages=function(t,n,r){if(e.isPlainObject(arguments[0])){n=t.each;r=t.waitForAll;t=t.finished}t=t||e.noop;n=n||e.noop;r=!!r;if(!e.isFunction(t)||!e.isFunction(n)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var i=e(this),s=[];if(r){var o=e.waitForImages.hasImageProperties||[],u=/url\((['"]?)(.*?)\1\)/g;i.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){s.push({src:t.attr("src"),element:t[0]})}e.each(o,function(e,n){var r=t.css(n);if(!r){return true}var i;while(i=u.exec(r)){s.push({src:i[2],element:t[0]})}})})}else{i.find("img:uncached").each(function(){s.push({src:this.src,element:this})})}var f=s.length,l=0;if(f==0){t.call(i[0])}e.each(s,function(r,s){var o=new Image;e(o).bind("load error",function(e){l++;n.call(s.element,l,f,e.type=="load");if(l==f){t.call(i[0]);return false}});o.src=s.src})})};})(jQuery); !function(jQuery,undefined){"use strict";var version={core:"5.4.5","revolution.extensions.actions.min.js":"2.1.0","revolution.extensions.carousel.min.js":"1.2.1","revolution.extensions.kenburn.min.js":"1.3.1","revolution.extensions.layeranimation.min.js":"3.6.1","revolution.extensions.navigation.min.js":"1.3.3","revolution.extensions.parallax.min.js":"2.2.0","revolution.extensions.slideanims.min.js":"1.7","revolution.extensions.video.min.js":"2.1.1"};jQuery.fn.extend({revolution:function(a){var b={delay:9e3,responsiveLevels:4064,visibilityLevels:[2048,1024,778,480],gridwidth:960,gridheight:500,minHeight:0,autoHeight:"off",sliderType:"standard",sliderLayout:"auto",fullScreenAutoWidth:"off",fullScreenAlignForce:"off",fullScreenOffsetContainer:"",fullScreenOffset:"0",hideCaptionAtLimit:0,hideAllCaptionAtLimit:0,hideSliderAtLimit:0,disableProgressBar:"off",stopAtSlide:-1,stopAfterLoops:-1,shadow:0,dottedOverlay:"none",startDelay:0,lazyType:"smart",spinner:"spinner0",shuffle:"off",viewPort:{enable:!1,outof:"wait",visible_area:"60%",presize:!1},fallbacks:{isJoomla:!1,panZoomDisableOnMobile:"off",simplifyAll:"on",nextSlideOnWindowFocus:"off",disableFocusListener:!0,ignoreHeightChanges:"off",ignoreHeightChangesSize:0,allowHTML5AutoPlayOnAndroid:!0},parallax:{type:"off",levels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],origo:"enterpoint",speed:400,bgparallax:"off",opacity:"on",disable_onmobile:"off",ddd_shadow:"on",ddd_bgfreeze:"off",ddd_overflow:"visible",ddd_layer_overflow:"visible",ddd_z_correction:65,ddd_path:"mouse"},scrolleffect:{fade:"off",blur:"off",scale:"off",grayscale:"off",maxblur:10,on_layers:"off",on_slidebg:"off",on_static_layers:"off",on_parallax_layers:"off",on_parallax_static_layers:"off",direction:"both",multiplicator:1.35,multiplicator_layers:.5,tilt:30,disable_on_mobile:"on"},carousel:{easing:punchgs.Power3.easeInOut,speed:800,showLayersAllTime:"off",horizontal_align:"center",vertical_align:"center",infinity:"on",space:0,maxVisibleItems:3,stretch:"off",fadeout:"on",maxRotation:0,minScale:0,vary_fade:"off",vary_rotation:"on",vary_scale:"off",border_radius:"0px",padding_top:0,padding_bottom:0},navigation:{keyboardNavigation:"off",keyboard_direction:"horizontal",mouseScrollNavigation:"off",onHoverStop:"on",touch:{touchenabled:"off",touchOnDesktop:"off",swipe_treshold:75,swipe_min_touches:1,drag_block_vertical:!1,swipe_direction:"horizontal"},arrows:{style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,tmp:"",rtl:!1,left:{h_align:"left",v_align:"center",h_offset:20,v_offset:0,container:"slider"},right:{h_align:"right",v_align:"center",h_offset:20,v_offset:0,container:"slider"}},bullets:{container:"slider",rtl:!1,style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",h_align:"left",v_align:"center",space:0,h_offset:20,v_offset:0,tmp:''},thumbnails:{container:"slider",rtl:!1,style:"",enable:!1,width:100,height:50,min_width:100,wrapper_padding:2,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,position:"inner",space:2,h_align:"left",v_align:"center",h_offset:20,v_offset:0},tabs:{container:"slider",rtl:!1,style:"",enable:!1,width:100,min_width:100,height:50,wrapper_padding:10,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,space:0,position:"inner",h_align:"left",v_align:"center",h_offset:20,v_offset:0}},extensions:"extensions/",extensions_suffix:".min.js",debugMode:!1};return a=jQuery.extend(!0,{},b,a),this.each(function(){var b=jQuery(this);a.minHeight=a.minHeight!=undefined?parseInt(a.minHeight,0):a.minHeight,a.scrolleffect.on="on"===a.scrolleffect.fade||"on"===a.scrolleffect.scale||"on"===a.scrolleffect.blur||"on"===a.scrolleffect.grayscale,"hero"==a.sliderType&&b.find(">ul>li").each(function(a){a>0&&jQuery(this).remove()}),a.jsFileLocation=a.jsFileLocation||getScriptLocation("themepunch.revolution.min.js"),a.jsFileLocation=a.jsFileLocation+a.extensions,a.scriptsneeded=getNeededScripts(a,b),a.curWinRange=0,a.rtl=!0,a.navigation!=undefined&&a.navigation.touch!=undefined&&(a.navigation.touch.swipe_min_touches=a.navigation.touch.swipe_min_touches>5?1:a.navigation.touch.swipe_min_touches),jQuery(this).on("scriptsloaded",function(){if(a.modulesfailing)return b.html('
    !! Error at loading Slider Revolution 5.0 Extrensions.'+a.errorm+"
    ").show(),!1;_R.migration!=undefined&&(a=_R.migration(b,a)),punchgs.force3D=!0,"on"!==a.simplifyAll&&punchgs.TweenLite.lagSmoothing(1e3,16),prepareOptions(b,a),initSlider(b,a)}),b[0].opt=a,waitForScripts(b,a)})},getRSVersion:function(a){if(!0===a)return jQuery("body").data("tp_rs_version");var b=jQuery("body").data("tp_rs_version"),c="";c+="---------------------------------------------------------\n",c+=" Currently Loaded Slider Revolution & SR Modules :\n",c+="---------------------------------------------------------\n";for(var d in b)c+=b[d].alias+": "+b[d].ver+"\n";return c+="---------------------------------------------------------\n"},revremoveslide:function(a){return this.each(function(){var b=jQuery(this),c=b[0].opt;if(!(a<0||a>c.slideamount)&&b!=undefined&&b.length>0&&jQuery("body").find("#"+b.attr("id")).length>0&&c&&c.li.length>0&&(a>0||a<=c.li.length)){var d=jQuery(c.li[a]),e=d.data("index"),f=!1;c.slideamount=c.slideamount-1,c.realslideamount=c.realslideamount-1,removeNavWithLiref(".tp-bullet",e,c),removeNavWithLiref(".tp-tab",e,c),removeNavWithLiref(".tp-thumb",e,c),d.hasClass("active-revslide")&&(f=!0),d.remove(),c.li=removeArray(c.li,a),c.carousel&&c.carousel.slides&&(c.carousel.slides=removeArray(c.carousel.slides,a)),c.thumbs=removeArray(c.thumbs,a),_R.updateNavIndexes&&_R.updateNavIndexes(c),f&&b.revnext(),punchgs.TweenLite.set(c.li,{minWidth:"99%"}),punchgs.TweenLite.set(c.li,{minWidth:"100%"})}})},revaddcallback:function(a){return this.each(function(){this.opt&&(this.opt.callBackArray===undefined&&(this.opt.callBackArray=new Array),this.opt.callBackArray.push(a))})},revgetparallaxproc:function(){return jQuery(this)[0].opt.scrollproc},revdebugmode:function(){return this.each(function(){var a=jQuery(this);a[0].opt.debugMode=!0,containerResized(a,a[0].opt)})},revscroll:function(a){return this.each(function(){var b=jQuery(this);jQuery("body,html").animate({scrollTop:b.offset().top+b.height()-a+"px"},{duration:400})})},revredraw:function(a){return this.each(function(){var a=jQuery(this);containerResized(a,a[0].opt)})},revkill:function(a){var b=this,c=jQuery(this);if(punchgs.TweenLite.killDelayedCallsTo(_R.showHideNavElements),c!=undefined&&c.length>0&&jQuery("body").find("#"+c.attr("id")).length>0){c.data("conthover",1),c.data("conthover-changed",1),c.trigger("revolution.slide.onpause");var d=c.parent().find(".tp-bannertimer"),e=c[0].opt;e.tonpause=!0,c.trigger("stoptimer");var f="resize.revslider-"+c.attr("id");jQuery(window).unbind(f),punchgs.TweenLite.killTweensOf(c.find("*"),!1),punchgs.TweenLite.killTweensOf(c,!1),c.unbind("hover, mouseover, mouseenter,mouseleave, resize");var f="resize.revslider-"+c.attr("id");jQuery(window).off(f),c.find("*").each(function(){var a=jQuery(this);a.unbind("on, hover, mouseenter,mouseleave,mouseover, resize,restarttimer, stoptimer"),a.off("on, hover, mouseenter,mouseleave,mouseover, resize"),a.data("mySplitText",null),a.data("ctl",null),a.data("tween")!=undefined&&a.data("tween").kill(),a.data("kenburn")!=undefined&&a.data("kenburn").kill(),a.data("timeline_out")!=undefined&&a.data("timeline_out").kill(),a.data("timeline")!=undefined&&a.data("timeline").kill(),a.remove(),a.empty(),a=null}),punchgs.TweenLite.killTweensOf(c.find("*"),!1),punchgs.TweenLite.killTweensOf(c,!1),d.remove();try{c.closest(".forcefullwidth_wrapper_tp_banner").remove()}catch(a){}try{c.closest(".rev_slider_wrapper").remove()}catch(a){}try{c.remove()}catch(a){}return c.empty(),c.html(),c=null,e=null,delete b.c,delete b.opt,delete b.container,!0}return!1},revpause:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&(a.data("conthover",1),a.data("conthover-changed",1),a.trigger("revolution.slide.onpause"),a[0].opt.tonpause=!0,a.trigger("stoptimer"))})},revresume:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&(a.data("conthover",0),a.data("conthover-changed",1),a.trigger("revolution.slide.onresume"),a[0].opt.tonpause=!1,a.trigger("starttimer"))})},revstart:function(){var a=jQuery(this);if(a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&a[0].opt!==undefined)return a[0].opt.sliderisrunning?(console.log("Slider Is Running Already"),!1):(runSlider(a,a[0].opt),!0)},revnext:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&_R.callingNewSlide(a,1)})},revprev:function(){return this.each(function(){var a=jQuery(this);a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0&&_R.callingNewSlide(a,-1)})},revmaxslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revcurrentslide:function(){var a=jQuery(this);if(a!=undefined&&a.length>0&&jQuery("body").find("#"+a.attr("id")).length>0)return parseInt(a[0].opt.act,0)+1},revlastslide:function(){return jQuery(this).find(".tp-revslider-mainul >li").length},revshowslide:function(a){return this.each(function(){var b=jQuery(this);b!=undefined&&b.length>0&&jQuery("body").find("#"+b.attr("id")).length>0&&_R.callingNewSlide(b,"to"+(a-1))})},revcallslidewithid:function(a){return this.each(function(){var b=jQuery(this);b!=undefined&&b.length>0&&jQuery("body").find("#"+b.attr("id")).length>0&&_R.callingNewSlide(b,a)})}});var _R=jQuery.fn.revolution;jQuery.extend(!0,_R,{getversion:function(){return version},compare_version:function(a){var b=jQuery("body").data("tp_rs_version");return b=b===undefined?new Object:b,b.Core===undefined&&(b.Core=new Object,b.Core.alias="Slider Revolution Core",b.Core.name="jquery.themepunch.revolution.min.js",b.Core.ver=_R.getversion().core),"stop"!=a.check&&(_R.getversion().core').appendTo(jQuery("body"));c.html("\x3c!--[if "+(b||"")+" IE "+(a||"")+"]> 1&&(b=!0);return b},is_android:function(){var a=["android","Android"],b=!1;for(var c in a)navigator.userAgent.split(a[c]).length>1&&(b=!0);return b},callBackHandling:function(a,b,c){try{a.callBackArray&&jQuery.each(a.callBackArray,function(a,d){d&&d.inmodule&&d.inmodule===b&&d.atposition&&d.atposition===c&&d.callback&&d.callback.call()})}catch(a){console.log("Call Back Failed")}},get_browser:function(){var c,a=navigator.appName,b=navigator.userAgent,d=b.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return d&&null!=(c=b.match(/version\/([\.\d]+)/i))&&(d[2]=c[1]),d=d?[d[1],d[2]]:[a,navigator.appVersion,"-?"],d[0]},get_browser_version:function(){var c,a=navigator.appName,b=navigator.userAgent,d=b.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return d&&null!=(c=b.match(/version\/([\.\d]+)/i))&&(d[2]=c[1]),d=d?[d[1],d[2]]:[a,navigator.appVersion,"-?"],d[1]},getHorizontalOffset:function(a,b){var c=gWiderOut(a,".outer-left"),d=gWiderOut(a,".outer-right");switch(b){case"left":return c;case"right":return d;case"both":return c+d}},callingNewSlide:function(a,b){var c=a.find(".next-revslide").length>0?a.find(".next-revslide").index():a.find(".processing-revslide").length>0?a.find(".processing-revslide").index():a.find(".active-revslide").index(),d=0,e=a[0].opt;a.find(".next-revslide").removeClass("next-revslide"),a.find(".active-revslide").hasClass("tp-invisible-slide")&&(c=e.last_shown_slide),b&&jQuery.isNumeric(b)||b.match(/to/g)?(1===b||-1===b?(d=c+b,d=d<0?e.slideamount-1:d>=e.slideamount?0:d):(b=jQuery.isNumeric(b)?b:parseInt(b.split("to")[1],0),d=b<0?0:b>e.slideamount-1?e.slideamount-1:b),a.find(".tp-revslider-slidesli:eq("+d+")").addClass("next-revslide")):b&&a.find(".tp-revslider-slidesli").each(function(){var a=jQuery(this);a.data("index")===b&&a.addClass("next-revslide")}),d=a.find(".next-revslide").index(),a.trigger("revolution.nextslide.waiting"),c===d&&c===e.last_shown_slide||d!==c&&-1!=d?swapSlide(a):a.find(".next-revslide").removeClass("next-revslide")},slotSize:function(a,b){b.slotw=Math.ceil(b.width/b.slots),"fullscreen"==b.sliderLayout?b.sloth=Math.ceil(jQuery(window).height()/b.slots):b.sloth=Math.ceil(b.height/b.slots),"on"==b.autoHeight&&a!==undefined&&""!==a&&(b.sloth=Math.ceil(a.height()/b.slots))},setSize:function(a){var b=(a.top_outer||0)+(a.bottom_outer||0),c=parseInt(a.carousel.padding_top||0,0),d=parseInt(a.carousel.padding_bottom||0,0),e=a.gridheight[a.curWinRange],f=0,g=-1===a.nextSlide||a.nextSlide===undefined?0:a.nextSlide;if(a.paddings=a.paddings===undefined?{top:parseInt(a.c.parent().css("paddingTop"),0)||0,bottom:parseInt(a.c.parent().css("paddingBottom"),0)||0}:a.paddings,a.rowzones&&a.rowzones.length>0)for(var h=0;ha.gridheight[a.curWinRange]&&"on"!=a.autoHeight&&(a.height=a.gridheight[a.curWinRange]),"fullscreen"==a.sliderLayout||a.infullscreenmode){a.height=a.bw*a.gridheight[a.curWinRange];var j=(a.c.parent().width(),jQuery(window).height());if(a.fullScreenOffsetContainer!=undefined){try{var k=a.fullScreenOffsetContainer.split(",");k&&jQuery.each(k,function(a,b){j=jQuery(b).length>0?j-jQuery(b).outerHeight(!0):j})}catch(a){}try{a.fullScreenOffset.split("%").length>1&&a.fullScreenOffset!=undefined&&a.fullScreenOffset.length>0?j-=jQuery(window).height()*parseInt(a.fullScreenOffset,0)/100:a.fullScreenOffset!=undefined&&a.fullScreenOffset.length>0&&(j-=parseInt(a.fullScreenOffset,0))}catch(a){}}j=jparseInt(a.height,0)?f:a.height}else a.minHeight!=undefined&&a.heightparseInt(a.height,0)?f:a.height,a.c.height(a.height);var l={height:c+d+b+a.height+a.paddings.top+a.paddings.bottom};a.c.closest(".forcefullwidth_wrapper_tp_banner").find(".tp-fullwidth-forcer").css(l),a.c.closest(".rev_slider_wrapper").css(l),setScale(a)},enterInViewPort:function(a){a.waitForCountDown&&(countDown(a.c,a),a.waitForCountDown=!1),a.waitForFirstSlide&&(swapSlide(a.c),a.waitForFirstSlide=!1,setTimeout(function(){a.c.removeClass("tp-waitforfirststart")},500)),"playing"!=a.sliderlaststatus&&a.sliderlaststatus!=undefined||a.c.trigger("starttimer"),a.lastplayedvideos!=undefined&&a.lastplayedvideos.length>0&&jQuery.each(a.lastplayedvideos,function(b,c){_R.playVideo(c,a)})},leaveViewPort:function(a){a.sliderlaststatus=a.sliderstatus,a.c.trigger("stoptimer"),a.playingvideos!=undefined&&a.playingvideos.length>0&&(a.lastplayedvideos=jQuery.extend(!0,[],a.playingvideos),a.playingvideos&&jQuery.each(a.playingvideos,function(b,c){a.leaveViewPortBasedStop=!0,_R.stopVideo&&_R.stopVideo(c,a)}))},unToggleState:function(a){a!=undefined&&a.length>0&&jQuery.each(a,function(a,b){b.removeClass("rs-toggle-content-active")})},toggleState:function(a){a!=undefined&&a.length>0&&jQuery.each(a,function(a,b){b.addClass("rs-toggle-content-active")})},swaptoggleState:function(a){a!=undefined&&a.length>0&&jQuery.each(a,function(a,b){jQuery(b).hasClass("rs-toggle-content-active")?jQuery(b).removeClass("rs-toggle-content-active"):jQuery(b).addClass("rs-toggle-content-active")})},lastToggleState:function(a){var b=0;return a!=undefined&&a.length>0&&jQuery.each(a,function(a,c){b=c.hasClass("rs-toggle-content-active")}),b}});var _ISM=_R.is_mobile(),_ANDROID=_R.is_android(),checkIDS=function(a,b){if(a.anyid=a.anyid===undefined?[]:a.anyid,-1!=jQuery.inArray(b.attr("id"),a.anyid)){var d=b.attr("id")+"_"+Math.round(9999*Math.random());b.attr("id",d)}a.anyid.push(b.attr("id"))},removeArray=function(a,b){var c=[];return jQuery.each(a,function(a,d){a!=b&&c.push(d)}),c},removeNavWithLiref=function(a,b,c){c.c.find(a).each(function(){var a=jQuery(this);a.data("liref")===b&&a.remove()})},lAjax=function(a,b){return!jQuery("body").data(a)&&(b.filesystem?(b.errorm===undefined&&(b.errorm="
    Local Filesystem Detected !
    Put this to your header:"),console.warn("Local Filesystem detected !"),b.errorm=b.errorm+'
    <script type="text/javascript" src="'+b.jsFileLocation+a+b.extensions_suffix+'"></script>',console.warn(b.jsFileLocation+a+b.extensions_suffix+" could not be loaded !"),console.warn("Please use a local Server or work online or make sure that you load all needed Libraries manually in your Document."),console.log(" "),b.modulesfailing=!0,!1):(jQuery.ajax({url:b.jsFileLocation+a+b.extensions_suffix+"?version="+version.core,dataType:"script",cache:!0,error:function(c){console.warn("Slider Revolution 5.0 Error !"),console.error("Failure at Loading:"+a+b.extensions_suffix+" on Path:"+b.jsFileLocation),console.info(c)}}),void jQuery("body").data(a,!0)))},getNeededScripts=function(a,b){var c=new Object,d=a.navigation;return c.kenburns=!1,c.parallax=!1,c.carousel=!1,c.navigation=!1,c.videos=!1,c.actions=!1,c.layeranim=!1,c.migration=!1,b.data("version")&&b.data("version").toString().match(/5./gi)?(b.find("img").each(function(){"on"==jQuery(this).data("kenburns")&&(c.kenburns=!0)}),("carousel"==a.sliderType||"on"==d.keyboardNavigation||"on"==d.mouseScrollNavigation||"on"==d.touch.touchenabled||d.arrows.enable||d.bullets.enable||d.thumbnails.enable||d.tabs.enable)&&(c.navigation=!0),b.find(".tp-caption, .tp-static-layer, .rs-background-video-layer").each(function(){var a=jQuery(this);(a.data("ytid")!=undefined||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&(c.videos=!0),(a.data("vimeoid")!=undefined||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&(c.videos=!0),a.data("actions")!==undefined&&(c.actions=!0),c.layeranim=!0}),b.find("li").each(function(){jQuery(this).data("link")&&jQuery(this).data("link")!=undefined&&(c.layeranim=!0,c.actions=!0)}),!c.videos&&(b.find(".rs-background-video-layer").length>0||b.find(".tp-videolayer").length>0||b.find(".tp-audiolayer").length>0||b.find("iframe").length>0||b.find("video").length>0)&&(c.videos=!0),"carousel"==a.sliderType&&(c.carousel=!0),("off"!==a.parallax.type||a.viewPort.enable||"true"==a.viewPort.enable||"true"===a.scrolleffect.on||a.scrolleffect.on)&&(c.parallax=!0)):(c.kenburns=!0,c.parallax=!0,c.carousel=!1,c.navigation=!0,c.videos=!0,c.actions=!0,c.layeranim=!0,c.migration=!0),"hero"==a.sliderType&&(c.carousel=!1,c.navigation=!1),window.location.href.match(/file:/gi)&&(c.filesystem=!0,a.filesystem=!0),c.videos&&void 0===_R.isVideoPlaying&&lAjax("revolution.extension.video",a),c.carousel&&void 0===_R.prepareCarousel&&lAjax("revolution.extension.carousel",a),c.carousel||void 0!==_R.animateSlide||lAjax("revolution.extension.slideanims",a),c.actions&&void 0===_R.checkActions&&lAjax("revolution.extension.actions",a),c.layeranim&&void 0===_R.handleStaticLayers&&lAjax("revolution.extension.layeranimation",a),c.kenburns&&void 0===_R.stopKenBurn&&lAjax("revolution.extension.kenburn",a),c.navigation&&void 0===_R.createNavigation&&lAjax("revolution.extension.navigation",a),c.migration&&void 0===_R.migration&&lAjax("revolution.extension.migration",a),c.parallax&&void 0===_R.checkForParallax&&lAjax("revolution.extension.parallax",a),a.addons!=undefined&&a.addons.length>0&&jQuery.each(a.addons,function(b,c){"object"==typeof c&&c.fileprefix!=undefined&&lAjax(c.fileprefix,a)}),c},waitForScripts=function(a,b){var c=!0,d=b.scriptsneeded;b.addons!=undefined&&b.addons.length>0&&jQuery.each(b.addons,function(a,b){"object"==typeof b&&b.init!=undefined&&_R[b.init]===undefined&&(c=!1)}),d.filesystem||"undefined"!=typeof punchgs&&c&&(!d.kenburns||d.kenburns&&void 0!==_R.stopKenBurn)&&(!d.navigation||d.navigation&&void 0!==_R.createNavigation)&&(!d.carousel||d.carousel&&void 0!==_R.prepareCarousel)&&(!d.videos||d.videos&&void 0!==_R.resetVideo)&&(!d.actions||d.actions&&void 0!==_R.checkActions)&&(!d.layeranim||d.layeranim&&void 0!==_R.handleStaticLayers)&&(!d.migration||d.migration&&void 0!==_R.migration)&&(!d.parallax||d.parallax&&void 0!==_R.checkForParallax)&&(d.carousel||!d.carousel&&void 0!==_R.animateSlide)?a.trigger("scriptsloaded"):setTimeout(function(){waitForScripts(a,b)},50)},getScriptLocation=function(a){var b=new RegExp("themepunch.revolution.min.js","gi"),c="";return jQuery("script").each(function(){var a=jQuery(this).attr("src");a&&a.match(b)&&(c=a)}),c=c.replace("jquery.themepunch.revolution.min.js",""),c=c.replace("jquery.themepunch.revolution.js",""),c=c.split("?")[0]},setCurWinRange=function(a,b){var d=9999,e=0,f=0,g=0,h=jQuery(window).width(),i=b&&9999==a.responsiveLevels?a.visibilityLevels:a.responsiveLevels;i&&i.length&&jQuery.each(i,function(a,b){hb)&&(d=b,g=a,e=b),h>b&&e'),container.find(">ul").addClass("tp-revslider-mainul"),opt.c=container,opt.ul=container.find(".tp-revslider-mainul"),opt.ul.find(">li").each(function(a){var b=jQuery(this);"on"==b.data("hideslideonmobile")&&_ISM&&b.remove(),(b.data("invisible")||!0===b.data("invisible"))&&(b.addClass("tp-invisible-slide"),b.appendTo(opt.ul))}),opt.addons!=undefined&&opt.addons.length>0&&jQuery.each(opt.addons,function(i,obj){"object"==typeof obj&&obj.init!=undefined&&_R[obj.init](eval(obj.params))}),opt.cid=container.attr("id"),opt.ul.css({visibility:"visible"}),opt.slideamount=opt.ul.find(">li").not(".tp-invisible-slide").length,opt.realslideamount=opt.ul.find(">li").length,opt.slayers=container.find(".tp-static-layers"),opt.slayers.data("index","staticlayers"),1!=opt.waitForInit&&(container[0].opt=opt,runSlider(container,opt))},onFullScreenChange=function(){jQuery("body").data("rs-fullScreenMode",!jQuery("body").data("rs-fullScreenMode")),jQuery("body").data("rs-fullScreenMode")&&setTimeout(function(){jQuery(window).trigger("resize")},200)},runSlider=function(a,b){if(b.sliderisrunning=!0,b.ul.find(">li").each(function(a){jQuery(this).data("originalindex",a)}),b.allli=b.ul.find(">li"),jQuery.each(b.allli,function(a,b){var b=jQuery(b);b.data("origindex",b.index())}),b.li=b.ul.find(">li").not(".tp-invisible-slide"),"on"==b.shuffle){var c=new Object,d=b.ul.find(">li:first-child");c.fstransition=d.data("fstransition"),c.fsmasterspeed=d.data("fsmasterspeed"),c.fsslotamount=d.data("fsslotamount");for(var e=0;eli:eq("+f+")").prependTo(b.ul)}var g=b.ul.find(">li:first-child");g.data("fstransition",c.fstransition),g.data("fsmasterspeed",c.fsmasterspeed),g.data("fsslotamount",c.fsslotamount),b.allli=b.ul.find(">li"),b.li=b.ul.find(">li").not(".tp-invisible-slide")}if(b.inli=b.ul.find(">li.tp-invisible-slide"),b.thumbs=new Array,b.slots=4,b.act=-1,b.firststart=1,b.loadqueue=new Array,b.syncload=0,b.conw=a.width(),b.conh=a.height(),b.responsiveLevels.length>1?b.responsiveLevels[0]=9999:b.responsiveLevels=9999,jQuery.each(b.allli,function(a,c){var c=jQuery(c),d=c.find(".rev-slidebg")||c.find("img").first(),e=0;c.addClass("tp-revslider-slidesli"),c.data("index")===undefined&&c.data("index","rs-"+Math.round(999999*Math.random()));var f=new Object;f.params=new Array,f.id=c.data("index"),f.src=c.data("thumb")!==undefined?c.data("thumb"):d.data("lazyload")!==undefined?d.data("lazyload"):d.attr("src"),c.data("title")!==undefined&&f.params.push({from:RegExp("\\{\\{title\\}\\}","g"),to:c.data("title")}),c.data("description")!==undefined&&f.params.push({from:RegExp("\\{\\{description\\}\\}","g"),to:c.data("description")});for(var e=1;e<=10;e++)c.data("param"+e)!==undefined&&f.params.push({from:RegExp("\\{\\{param"+e+"\\}\\}","g"),to:c.data("param"+e)});if(b.thumbs.push(f),c.data("link")!=undefined){var g=c.data("link"),h=c.data("target")||"_self",i="back"===c.data("slideindex")?0:60,j=c.data("linktoslide"),k=j;j!=undefined&&"next"!=j&&"prev"!=j&&b.allli.each(function(){var a=jQuery(this);a.data("origindex")+1==k&&(j=a.data("index"))}),"slide"!=g&&(j="no");var l=''),w+=c.sloth,void 0!=i&&void 0!=j&&punchgs.TweenLite.set(f.find(".slot").last(),{rotationZ:j});v+=c.slotw}break;case"vertical":case"horizontal":if("horizontal"==e){if(!d)var q=0-c.slotw;for(var y=0;y
    '),void 0!=i&&void 0!=j&&punchgs.TweenLite.set(f.find(".slot").last(),{rotationZ:j})}else{if(!d)var q=0-c.sloth;for(var y=0;y
    '),void 0!=i&&void 0!=j&&punchgs.TweenLite.set(f.find(".slot").last(),{rotationZ:j})}}},e=function(a,b,c,d){function y(){jQuery.each(v,function(a,c){c[0]!=b&&c[8]!=b||(q=c[1],r=c[2],s=t),t+=1})}var e=a[0].opt,f=punchgs.Power1.easeIn,g=punchgs.Power1.easeOut,h=punchgs.Power1.easeInOut,i=punchgs.Power2.easeIn,j=punchgs.Power2.easeOut,k=punchgs.Power2.easeInOut,m=(punchgs.Power3.easeIn,punchgs.Power3.easeOut),n=punchgs.Power3.easeInOut,o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],p=[16,17,18,19,20,21,22,23,24,25,27],q=0,r=1,s=0,t=0,v=(new Array,[["boxslide",0,1,10,0,"box",!1,null,0,g,g,500,6],["boxfade",1,0,10,0,"box",!1,null,1,h,h,700,5],["slotslide-horizontal",2,0,0,200,"horizontal",!0,!1,2,k,k,700,3],["slotslide-vertical",3,0,0,200,"vertical",!0,!1,3,k,k,700,3],["curtain-1",4,3,0,0,"horizontal",!0,!0,4,g,g,300,5],["curtain-2",5,3,0,0,"horizontal",!0,!0,5,g,g,300,5],["curtain-3",6,3,25,0,"horizontal",!0,!0,6,g,g,300,5],["slotzoom-horizontal",7,0,0,400,"horizontal",!0,!0,7,g,g,300,7],["slotzoom-vertical",8,0,0,0,"vertical",!0,!0,8,j,j,500,8],["slotfade-horizontal",9,0,0,1e3,"horizontal",!0,null,9,j,j,2e3,10],["slotfade-vertical",10,0,0,1e3,"vertical",!0,null,10,j,j,2e3,10],["fade",11,0,1,300,"horizontal",!0,null,11,k,k,1e3,1],["crossfade",11,1,1,300,"horizontal",!0,null,11,k,k,1e3,1],["fadethroughdark",11,2,1,300,"horizontal",!0,null,11,k,k,1e3,1],["fadethroughlight",11,3,1,300,"horizontal",!0,null,11,k,k,1e3,1],["fadethroughtransparent",11,4,1,300,"horizontal",!0,null,11,k,k,1e3,1],["slideleft",12,0,1,0,"horizontal",!0,!0,12,n,n,1e3,1],["slideup",13,0,1,0,"horizontal",!0,!0,13,n,n,1e3,1],["slidedown",14,0,1,0,"horizontal",!0,!0,14,n,n,1e3,1],["slideright",15,0,1,0,"horizontal",!0,!0,15,n,n,1e3,1],["slideoverleft",12,7,1,0,"horizontal",!0,!0,12,n,n,1e3,1],["slideoverup",13,7,1,0,"horizontal",!0,!0,13,n,n,1e3,1],["slideoverdown",14,7,1,0,"horizontal",!0,!0,14,n,n,1e3,1],["slideoverright",15,7,1,0,"horizontal",!0,!0,15,n,n,1e3,1],["slideremoveleft",12,8,1,0,"horizontal",!0,!0,12,n,n,1e3,1],["slideremoveup",13,8,1,0,"horizontal",!0,!0,13,n,n,1e3,1],["slideremovedown",14,8,1,0,"horizontal",!0,!0,14,n,n,1e3,1],["slideremoveright",15,8,1,0,"horizontal",!0,!0,15,n,n,1e3,1],["papercut",16,0,0,600,"",null,null,16,n,n,1e3,2],["3dcurtain-horizontal",17,0,20,100,"vertical",!1,!0,17,h,h,500,7],["3dcurtain-vertical",18,0,10,100,"horizontal",!1,!0,18,h,h,500,5],["cubic",19,0,20,600,"horizontal",!1,!0,19,n,n,500,1],["cube",19,0,20,600,"horizontal",!1,!0,20,n,n,500,1],["flyin",20,0,4,600,"vertical",!1,!0,21,m,n,500,1],["turnoff",21,0,1,500,"horizontal",!1,!0,22,n,n,500,1],["incube",22,0,20,200,"horizontal",!1,!0,23,k,k,500,1],["cubic-horizontal",23,0,20,500,"vertical",!1,!0,24,j,j,500,1],["cube-horizontal",23,0,20,500,"vertical",!1,!0,25,j,j,500,1],["incube-horizontal",24,0,20,500,"vertical",!1,!0,26,k,k,500,1],["turnoff-vertical",25,0,1,200,"horizontal",!1,!0,27,k,k,500,1],["fadefromright",12,1,1,0,"horizontal",!0,!0,28,k,k,1e3,1],["fadefromleft",15,1,1,0,"horizontal",!0,!0,29,k,k,1e3,1],["fadefromtop",14,1,1,0,"horizontal",!0,!0,30,k,k,1e3,1],["fadefrombottom",13,1,1,0,"horizontal",!0,!0,31,k,k,1e3,1],["fadetoleftfadefromright",12,2,1,0,"horizontal",!0,!0,32,k,k,1e3,1],["fadetorightfadefromleft",15,2,1,0,"horizontal",!0,!0,33,k,k,1e3,1],["fadetobottomfadefromtop",14,2,1,0,"horizontal",!0,!0,34,k,k,1e3,1],["fadetotopfadefrombottom",13,2,1,0,"horizontal",!0,!0,35,k,k,1e3,1],["parallaxtoright",15,3,1,0,"horizontal",!0,!0,36,k,i,1500,1],["parallaxtoleft",12,3,1,0,"horizontal",!0,!0,37,k,i,1500,1],["parallaxtotop",14,3,1,0,"horizontal",!0,!0,38,k,f,1500,1],["parallaxtobottom",13,3,1,0,"horizontal",!0,!0,39,k,f,1500,1],["scaledownfromright",12,4,1,0,"horizontal",!0,!0,40,k,i,1e3,1],["scaledownfromleft",15,4,1,0,"horizontal",!0,!0,41,k,i,1e3,1],["scaledownfromtop",14,4,1,0,"horizontal",!0,!0,42,k,i,1e3,1],["scaledownfrombottom",13,4,1,0,"horizontal",!0,!0,43,k,i,1e3,1],["zoomout",13,5,1,0,"horizontal",!0,!0,44,k,i,1e3,1],["zoomin",13,6,1,0,"horizontal",!0,!0,45,k,i,1e3,1],["slidingoverlayup",27,0,1,0,"horizontal",!0,!0,47,h,g,2e3,1],["slidingoverlaydown",28,0,1,0,"horizontal",!0,!0,48,h,g,2e3,1],["slidingoverlayright",30,0,1,0,"horizontal",!0,!0,49,h,g,2e3,1],["slidingoverlayleft",29,0,1,0,"horizontal",!0,!0,50,h,g,2e3,1],["parallaxcirclesup",31,0,1,0,"horizontal",!0,!0,51,k,f,1500,1],["parallaxcirclesdown",32,0,1,0,"horizontal",!0,!0,52,k,f,1500,1],["parallaxcirclesright",33,0,1,0,"horizontal",!0,!0,53,k,f,1500,1],["parallaxcirclesleft",34,0,1,0,"horizontal",!0,!0,54,k,f,1500,1],["notransition",26,0,1,0,"horizontal",!0,null,46,k,i,1e3,1],["parallaxright",15,3,1,0,"horizontal",!0,!0,55,k,i,1500,1],["parallaxleft",12,3,1,0,"horizontal",!0,!0,56,k,i,1500,1],["parallaxup",14,3,1,0,"horizontal",!0,!0,57,k,f,1500,1],["parallaxdown",13,3,1,0,"horizontal",!0,!0,58,k,f,1500,1],["grayscale",11,5,1,300,"horizontal",!0,null,11,k,k,1e3,1],["grayscalecross",11,6,1,300,"horizontal",!0,null,11,k,k,1e3,1],["brightness",11,7,1,300,"horizontal",!0,null,11,k,k,1e3,1],["brightnesscross",11,8,1,300,"horizontal",!0,null,11,k,k,1e3,1],["blurlight",11,9,1,300,"horizontal",!0,null,11,k,k,1e3,1],["blurlightcross",11,10,1,300,"horizontal",!0,null,11,k,k,1e3,1],["blurstrong",11,9,1,300,"horizontal",!0,null,11,k,k,1e3,1],["blurstrongcross",11,10,1,300,"horizontal",!0,null,11,k,k,1e3,1]]);e.duringslidechange=!0,e.testanims=!1,1==e.testanims&&(e.nexttesttransform=void 0===e.nexttesttransform?34:e.nexttesttransform+1,e.nexttesttransform=e.nexttesttransform>70?0:e.nexttesttransform,b=v[e.nexttesttransform][0],console.log(b+" "+e.nexttesttransform+" "+v[e.nexttesttransform][1]+" "+v[e.nexttesttransform][2])),jQuery.each(["parallaxcircles","slidingoverlay","slide","slideover","slideremove","parallax","parralaxto"],function(a,c){b==c+"horizontal"&&(b=1!=d?c+"left":c+"right"),b==c+"vertical"&&(b=1!=d?c+"up":c+"down")}),"random"==b&&(b=Math.round(Math.random()*v.length-1))>v.length-1&&(b=v.length-1),"random-static"==b&&(b=Math.round(Math.random()*o.length-1),b>o.length-1&&(b=o.length-1),b=o[b]),"random-premium"==b&&(b=Math.round(Math.random()*p.length-1),b>p.length-1&&(b=p.length-1),b=p[b]);var w=[12,13,14,15,16,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45];if(1==e.isJoomla&&void 0!=window.MooTools&&-1!=w.indexOf(b)){var x=Math.round(Math.random()*(p.length-2))+1;x>p.length-1&&(x=p.length-1),0==x&&(x=1),b=p[x]}y(),q>30&&(q=30),q<0&&(q=0);var z=new Object;return z.nexttrans=q,z.STA=v[s],z.specials=r,z},f=function(a,b){return void 0==b||jQuery.isNumeric(a)?a:void 0==a?a:a.split(",")[b]},g=function(a,b,c,g,h,i,j,k){function V(a,b,c,d,e){var f=a.find(".slot"),g=6,h=[2,1.2,.9,.7,.55,.42],j=a.width(),l=a.height();f.wrap('
    ');for(var n=0;nl?h[a]*j:h[a]*l,m=i,n=m/2-j/2+0,o=i/2-l/2+0,p=0!=a?"50%":"0",q=l/2-i/2,r=33==c?j/2-m/2:34==c?j-m:j/2-m/2,s={scale:1,transformOrigo:"50% 50%",width:m+"px",height:i+"px",top:q+"px",left:r+"px",borderRadius:p},t={scale:1,top:l/2-i/2,left:j/2-m/2,ease:e},u=o,v=33==c?n:34==c?n+j/2:n,w={width:j,height:l,autoAlpha:1,top:u+"px",position:"absolute",left:v+"px"},x={top:o+"px",left:n+"px",ease:e},y=b,z=0;k.add(punchgs.TweenLite.fromTo(d,y,s,t),z),k.add(punchgs.TweenLite.fromTo(f,y,w,x),z),k.add(punchgs.TweenLite.fromTo(d,.001,{autoAlpha:0},{autoAlpha:1}),0)}})}var l=c[0].opt,m=h.index(),n=g.index(),o=nl.delay?l.delay:t,t+=q[4],l.slots=f(g.data("slotamount"),s),l.slots=void 0==l.slots||"default"==l.slots?q[12]:"random"==l.slots?Math.round(12*Math.random()+4):l.slots,l.slots=l.slots<1?"boxslide"==b?Math.round(6*Math.random()+3):"flyin"==b?Math.round(4*Math.random()+1):l.slots:l.slots,l.slots=(4==a||5==a||6==a)&&l.slots<3?3:l.slots,l.slots=0!=q[3]?Math.min(l.slots,q[3]):l.slots,l.slots=9==a?l.width/l.slots:10==a?l.height/l.slots:l.slots,l.rotate=f(g.data("rotate"),s),l.rotate=void 0==l.rotate||"default"==l.rotate?0:999==l.rotate||"random"==l.rotate?Math.round(360*Math.random()):l.rotate,l.rotate=l.ie||l.ie9?0:l.rotate,11!=a&&(null!=q[7]&&d(j,l,q[7],q[5]),null!=q[6]&&d(i,l,q[6],q[5])),k.add(punchgs.TweenLite.set(i.find(".defaultvid"),{y:0,x:0,top:0,left:0,scale:1}),0),k.add(punchgs.TweenLite.set(j.find(".defaultvid"),{y:0,x:0,top:0,left:0,scale:1}),0),k.add(punchgs.TweenLite.set(i.find(".defaultvid"),{y:"+0%",x:"+0%"}),0),k.add(punchgs.TweenLite.set(j.find(".defaultvid"),{y:"+0%",x:"+0%"}),0),k.add(punchgs.TweenLite.set(i,{autoAlpha:1,y:"+0%",x:"+0%"}),0),k.add(punchgs.TweenLite.set(j,{autoAlpha:1,y:"+0%",x:"+0%"}),0),k.add(punchgs.TweenLite.set(i.parent(),{backgroundColor:"transparent"}),0),k.add(punchgs.TweenLite.set(j.parent(),{backgroundColor:"transparent"}),0);var u=f(g.data("easein"),s),v=f(g.data("easeout"),s);if(u="default"===u?q[9]||punchgs.Power2.easeInOut:u||q[9]||punchgs.Power2.easeInOut,v="default"===v?q[10]||punchgs.Power2.easeInOut:v||q[10]||punchgs.Power2.easeInOut,0==a){var w=Math.ceil(l.height/l.sloth),x=0;i.find(".slotslide").each(function(a){var b=jQuery(this);x+=1,x==w&&(x=0),k.add(punchgs.TweenLite.from(b,t/600,{opacity:0,top:0-l.sloth,left:0-l.slotw,rotation:l.rotate,force3D:"auto",ease:u}),(15*a+30*x)/1500)})}if(1==a){var y,z=0;i.find(".slotslide").each(function(a){var b=jQuery(this),c=Math.random()*t+300,d=500*Math.random()+200;c+d>y&&(y=d+d,z=a),k.add(punchgs.TweenLite.from(b,c/1e3,{autoAlpha:0,force3D:"auto",rotation:l.rotate,ease:u}),d/1e3)})}if(2==a){var A=new punchgs.TimelineLite;j.find(".slotslide").each(function(){var a=jQuery(this);A.add(punchgs.TweenLite.to(a,t/1e3,{left:l.slotw,ease:u,force3D:"auto",rotation:0-l.rotate}),0),k.add(A,0)}),i.find(".slotslide").each(function(){var a=jQuery(this);A.add(punchgs.TweenLite.from(a,t/1e3,{left:0-l.slotw,ease:u,force3D:"auto",rotation:l.rotate}),0),k.add(A,0)})}if(3==a){var A=new punchgs.TimelineLite;j.find(".slotslide").each(function(){var a=jQuery(this);A.add(punchgs.TweenLite.to(a,t/1e3,{top:l.sloth,ease:u,rotation:l.rotate,force3D:"auto",transformPerspective:600}),0),k.add(A,0)}),i.find(".slotslide").each(function(){var a=jQuery(this);A.add(punchgs.TweenLite.from(a,t/1e3,{top:0-l.sloth,rotation:l.rotate,ease:v,force3D:"auto",transformPerspective:600}),0),k.add(A,0)})}if(4==a||5==a){setTimeout(function(){j.find(".defaultimg").css({opacity:0})},100);var B=t/1e3,A=new punchgs.TimelineLite;j.find(".slotslide").each(function(b){var c=jQuery(this),d=b*B/l.slots;5==a&&(d=(l.slots-b-1)*B/l.slots/1.5),A.add(punchgs.TweenLite.to(c,3*B,{transformPerspective:600,force3D:"auto",top:0+l.height,opacity:.5,rotation:l.rotate,ease:u,delay:d}),0),k.add(A,0)}),i.find(".slotslide").each(function(b){var c=jQuery(this),d=b*B/l.slots;5==a&&(d=(l.slots-b-1)*B/l.slots/1.5),A.add(punchgs.TweenLite.from(c,3*B,{top:0-l.height,opacity:.5,rotation:l.rotate,force3D:"auto",ease:punchgs.eo,delay:d}),0),k.add(A,0)})}if(6==a){l.slots<2&&(l.slots=2),l.slots%2&&(l.slots=l.slots+1);var A=new punchgs.TimelineLite;setTimeout(function(){j.find(".defaultimg").css({opacity:0})},100),j.find(".slotslide").each(function(a){var b=jQuery(this);if(a+1l.delay&&(t=l.delay);var A=new punchgs.TimelineLite;setTimeout(function(){j.find(".defaultimg").css({opacity:0})},100),j.find(".slotslide").each(function(){var a=jQuery(this).find("div");A.add(punchgs.TweenLite.to(a,t/1e3,{left:0-l.slotw/2+"px",top:0-l.height/2+"px",width:2*l.slotw+"px",height:2*l.height+"px",opacity:0,rotation:l.rotate,force3D:"auto",ease:u}),0),k.add(A,0)}),i.find(".slotslide").each(function(a){var b=jQuery(this).find("div");A.add(punchgs.TweenLite.fromTo(b,t/1e3,{left:0,top:0,opacity:0,transformPerspective:600},{left:0-a*l.slotw+"px",ease:v,force3D:"auto",top:"0px",width:l.width,height:l.height,opacity:1,rotation:0,delay:.1}),0),k.add(A,0)})}if(8==a){t*=3,t>l.delay&&(t=l.delay);var A=new punchgs.TimelineLite;j.find(".slotslide").each(function(){var a=jQuery(this).find("div");A.add(punchgs.TweenLite.to(a,t/1e3,{left:0-l.width/2+"px",top:0-l.sloth/2+"px",width:2*l.width+"px",height:2*l.sloth+"px",force3D:"auto",ease:u,opacity:0,rotation:l.rotate}),0),k.add(A,0)}),i.find(".slotslide").each(function(a){var b=jQuery(this).find("div");A.add(punchgs.TweenLite.fromTo(b,t/1e3,{left:0,top:0,opacity:0,force3D:"auto"},{left:"0px",top:0-a*l.sloth+"px",width:i.find(".defaultimg").data("neww")+"px",height:i.find(".defaultimg").data("newh")+"px",opacity:1,ease:v,rotation:0}),0),k.add(A,0)})}if(9==a||10==a){var D=0;i.find(".slotslide").each(function(a){var b=jQuery(this);D++,k.add(punchgs.TweenLite.fromTo(b,t/2e3,{autoAlpha:0,force3D:"auto",transformPerspective:600},{autoAlpha:1,ease:u,delay:a*l.slots/100/2e3}),0)})}if(27==a||28==a||29==a||30==a){var E=i.find(".slot"),F=27==a||28==a?1:2,G=27==a||29==a?"-100%":"+100%",H=27==a||29==a?"+100%":"-100%",I=27==a||29==a?"-80%":"80%",J=27==a||29==a?"+80%":"-80%",K=27==a||29==a?"+10%":"-10%",L={overwrite:"all"},M={autoAlpha:0,zIndex:1,force3D:"auto",ease:u},N={position:"inherit",autoAlpha:0,overwrite:"all",zIndex:1},O={autoAlpha:1,force3D:"auto",ease:v},P={overwrite:"all",zIndex:2,opacity:1,autoAlpha:1},Q={autoAlpha:1,force3D:"auto",overwrite:"all",ease:u},R={overwrite:"all",zIndex:2,autoAlpha:1},S={autoAlpha:1,force3D:"auto",ease:u},T=1==F?"y":"x";L[T]="0px",M[T]=G,N[T]=K,O[T]="0%",P[T]=H,Q[T]=G,R[T]=I,S[T]=J,E.append(''),k.add(punchgs.TweenLite.fromTo(j,t/1e3,L,M),0),k.add(punchgs.TweenLite.fromTo(i.find(".defaultimg"),t/2e3,N,O),t/2e3),k.add(punchgs.TweenLite.fromTo(E,t/1e3,P,Q),0),k.add(punchgs.TweenLite.fromTo(E.find(".slotslide div"),t/1e3,R,S),0)}if(31==a||32==a||33==a||34==a){t=6e3,u=punchgs.Power3.easeInOut;var U=t/1e3;mas=U-U/5,_nt=a,fy=31==_nt?"+100%":32==_nt?"-100%":"0%",fx=33==_nt?"+100%":34==_nt?"-100%":"0%",ty=31==_nt?"-100%":32==_nt?"+100%":"0%",tx=33==_nt?"-100%":34==_nt?"+100%":"0%",k.add(punchgs.TweenLite.fromTo(j,U-.2*U,{y:0,x:0},{y:ty,x:tx,ease:v}),.2*U),k.add(punchgs.TweenLite.fromTo(i,U,{y:fy,x:fx},{y:"0%",x:"0%",ease:u}),0),i.find(".slot").remove(),i.find(".defaultimg").clone().appendTo(i).addClass("slot"),V(i,U,_nt,"in",u)}if(11==a){r>12&&(r=0);var D=0,W=2==r?"#000000":3==r?"#ffffff":"transparent";switch(r){case 0:k.add(punchgs.TweenLite.fromTo(i,t/1e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:u}),0);break;case 1:k.add(punchgs.TweenLite.fromTo(i,t/1e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:u}),0),k.add(punchgs.TweenLite.fromTo(j,t/1e3,{autoAlpha:1},{autoAlpha:0,force3D:"auto",ease:u}),0);break;case 2:case 3:case 4:k.add(punchgs.TweenLite.set(j.parent(),{backgroundColor:W,force3D:"auto"}),0),k.add(punchgs.TweenLite.set(i.parent(),{backgroundColor:"transparent",force3D:"auto"}),0),k.add(punchgs.TweenLite.to(j,t/2e3,{autoAlpha:0,force3D:"auto",ease:u}),0),k.add(punchgs.TweenLite.fromTo(i,t/2e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:u}),t/2e3);break;case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:var X=jQuery.inArray(r,[9,10])>=0?5:jQuery.inArray(r,[11,12])>=0?10:0,Y=jQuery.inArray(r,[5,6,7,8])>=0?100:0,Z=jQuery.inArray(r,[7,8])>=0?300:0,$="blur("+X+"px) grayscale("+Y+"%) brightness("+Z+"%)",_="blur(0px) grayscale(0%) brightness(100%)";k.add(punchgs.TweenLite.fromTo(i,t/1e3,{autoAlpha:0,filter:$,"-webkit-filter":$},{autoAlpha:1,filter:_,"-webkit-filter":_,force3D:"auto",ease:u}),0),jQuery.inArray(r,[6,8,10])>=0&&k.add(punchgs.TweenLite.fromTo(j,t/1e3,{autoAlpha:1,filter:_,"-webkit-filter":_},{autoAlpha:0,force3D:"auto",ease:u,filter:$,"-webkit-filter":$}),0)}k.add(punchgs.TweenLite.set(i.find(".defaultimg"),{autoAlpha:1}),0),k.add(punchgs.TweenLite.set(j.find("defaultimg"),{autoAlpha:1}),0)}if(26==a){var D=0;t=0,k.add(punchgs.TweenLite.fromTo(i,t/1e3,{autoAlpha:0},{autoAlpha:1,force3D:"auto",ease:u}),0),k.add(punchgs.TweenLite.to(j,t/1e3,{autoAlpha:0,force3D:"auto",ease:u}),0),k.add(punchgs.TweenLite.set(i.find(".defaultimg"),{autoAlpha:1}),0),k.add(punchgs.TweenLite.set(j.find("defaultimg"),{autoAlpha:1}),0)}if(12==a||13==a||14==a||15==a){t=t,t>l.delay&&(t=l.delay),setTimeout(function(){punchgs.TweenLite.set(j.find(".defaultimg"),{autoAlpha:0})},100);var aa=l.width,ba=l.height,ca=i.find(".slotslide, .defaultvid"),da=0,ea=0,fa=1,ga=1,ha=1,ia=t/1e3,ja=ia;"fullwidth"!=l.sliderLayout&&"fullscreen"!=l.sliderLayout||(aa=ca.width(),ba=ca.height()),12==a?da=aa:15==a?da=0-aa:13==a?ea=ba:14==a&&(ea=0-ba),1==r&&(fa=0),2==r&&(fa=0),3==r&&(ia=t/1300),4!=r&&5!=r||(ga=.6),6==r&&(ga=1.4),5!=r&&6!=r||(ha=1.4,fa=0,aa=0,ba=0,da=0,ea=0),6==r&&(ha=.6);7==r&&(aa=0,ba=0);var la=i.find(".slotslide"),ma=j.find(".slotslide, .defaultvid");if(k.add(punchgs.TweenLite.set(h,{zIndex:15}),0),k.add(punchgs.TweenLite.set(g,{zIndex:20}),0),8==r?(k.add(punchgs.TweenLite.set(h,{zIndex:20}),0),k.add(punchgs.TweenLite.set(g,{zIndex:15}),0),k.add(punchgs.TweenLite.set(la,{left:0,top:0,scale:1,opacity:1,rotation:0,ease:u,force3D:"auto"}),0)):k.add(punchgs.TweenLite.from(la,ia,{left:da,top:ea,scale:ha,opacity:fa,rotation:l.rotate,ease:u,force3D:"auto"}),0),4!=r&&5!=r||(aa=0,ba=0),1!=r)switch(a){case 12:k.add(punchgs.TweenLite.to(ma,ja,{left:0-aa+"px",force3D:"auto",scale:ga,opacity:fa,rotation:l.rotate,ease:v}),0);break;case 15:k.add(punchgs.TweenLite.to(ma,ja,{left:aa+"px",force3D:"auto",scale:ga,opacity:fa,rotation:l.rotate,ease:v}),0);break;case 13:k.add(punchgs.TweenLite.to(ma,ja,{top:0-ba+"px",force3D:"auto",scale:ga,opacity:fa,rotation:l.rotate,ease:v}),0);break;case 14:k.add(punchgs.TweenLite.to(ma,ja,{top:ba+"px",force3D:"auto",scale:ga,opacity:fa,rotation:l.rotate,ease:v}),0)}}if(16==a){var A=new punchgs.TimelineLite;k.add(punchgs.TweenLite.set(h,{position:"absolute","z-index":20}),0),k.add(punchgs.TweenLite.set(g,{position:"absolute","z-index":15}),0),h.wrapInner('
    '),h.find(".tp-half-one").clone(!0).appendTo(h).addClass("tp-half-two"),h.find(".tp-half-two").removeClass("tp-half-one");var aa=l.width,ba=l.height;"on"==l.autoHeight&&(ba=c.height()),h.find(".tp-half-one .defaultimg").wrap('
    '),h.find(".tp-half-two .defaultimg").wrap('
    '),h.find(".tp-half-two .defaultimg").css({position:"absolute",top:"-50%"}),h.find(".tp-half-two .tp-caption").wrapAll('
    '),k.add(punchgs.TweenLite.set(h.find(".tp-half-two"),{width:aa,height:ba,overflow:"hidden",zIndex:15,position:"absolute",top:ba/2,left:"0px",transformPerspective:600,transformOrigin:"center bottom"}),0),k.add(punchgs.TweenLite.set(h.find(".tp-half-one"),{width:aa,height:ba/2,overflow:"visible",zIndex:10,position:"absolute",top:"0px",left:"0px",transformPerspective:600,transformOrigin:"center top"}),0);var oa=(h.find(".defaultimg"),Math.round(20*Math.random()-10)),pa=Math.round(20*Math.random()-10),qa=Math.round(20*Math.random()-10),ra=.4*Math.random()-.2,sa=.4*Math.random()-.2,ta=1*Math.random()+1,ua=1*Math.random()+1,va=.3*Math.random()+.3;k.add(punchgs.TweenLite.set(h.find(".tp-half-one"),{overflow:"hidden"}),0),k.add(punchgs.TweenLite.fromTo(h.find(".tp-half-one"),t/800,{width:aa,height:ba/2,position:"absolute",top:"0px",left:"0px",force3D:"auto",transformOrigin:"center top"},{scale:ta,rotation:oa,y:0-ba-ba/4,autoAlpha:0,ease:u}),0),k.add(punchgs.TweenLite.fromTo(h.find(".tp-half-two"),t/800,{width:aa,height:ba,overflow:"hidden",position:"absolute",top:ba/2,left:"0px",force3D:"auto",transformOrigin:"center bottom"},{scale:ua,rotation:pa,y:ba+ba/4,ease:u,autoAlpha:0,onComplete:function(){punchgs.TweenLite.set(h,{position:"absolute","z-index":15}),punchgs.TweenLite.set(g,{position:"absolute","z-index":20}),h.find(".tp-half-one").length>0&&(h.find(".tp-half-one .defaultimg").unwrap(),h.find(".tp-half-one .slotholder").unwrap()),h.find(".tp-half-two").remove()}}),0),A.add(punchgs.TweenLite.set(i.find(".defaultimg"),{autoAlpha:1}),0),null!=h.html()&&k.add(punchgs.TweenLite.fromTo(g,(t-200)/1e3,{scale:va,x:l.width/4*ra,y:ba/4*sa,rotation:qa,force3D:"auto",transformOrigin:"center center",ease:v},{autoAlpha:1,scale:1,x:0,y:0,rotation:0}),0),k.add(A,0)}if(17==a&&i.find(".slotslide").each(function(a){var b=jQuery(this);k.add(punchgs.TweenLite.fromTo(b,t/800,{opacity:0,rotationY:0,scale:.9,rotationX:-110,force3D:"auto",transformPerspective:600,transformOrigin:"center center"},{opacity:1,top:0,left:0,scale:1,rotation:0,rotationX:0,force3D:"auto",rotationY:0,ease:u,delay:.06*a}),0)}),18==a&&i.find(".slotslide").each(function(a){var b=jQuery(this);k.add(punchgs.TweenLite.fromTo(b,t/500,{autoAlpha:0,rotationY:110,scale:.9,rotationX:10,force3D:"auto",transformPerspective:600,transformOrigin:"center center"},{autoAlpha:1,top:0,left:0,scale:1,rotation:0,rotationX:0,force3D:"auto",rotationY:0,ease:u,delay:.06*a}),0)}),19==a||22==a){var A=new punchgs.TimelineLite;k.add(punchgs.TweenLite.set(h,{zIndex:20}),0),k.add(punchgs.TweenLite.set(g,{zIndex:20}),0),setTimeout(function(){j.find(".defaultimg").css({opacity:0})},100);var wa=90,fa=1,xa="center center ";1==o&&(wa=-90),19==a?(xa=xa+"-"+l.height/2,fa=0):xa+=l.height/2,punchgs.TweenLite.set(c,{transformStyle:"flat",backfaceVisibility:"hidden",transformPerspective:600}),i.find(".slotslide").each(function(a){var b=jQuery(this);A.add(punchgs.TweenLite.fromTo(b,t/1e3,{transformStyle:"flat",backfaceVisibility:"hidden",left:0,rotationY:l.rotate,z:10,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:xa,rotationX:wa},{left:0,rotationY:0,top:0,z:0,scale:1,force3D:"auto",rotationX:0,delay:50*a/1e3,ease:u}),0),A.add(punchgs.TweenLite.to(b,.1,{autoAlpha:1,delay:50*a/1e3}),0),k.add(A)}),j.find(".slotslide").each(function(a){var b=jQuery(this),c=-90;1==o&&(c=90),A.add(punchgs.TweenLite.fromTo(b,t/1e3,{transformStyle:"flat",backfaceVisibility:"hidden",autoAlpha:1,rotationY:0,top:0,z:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:xa,rotationX:0},{autoAlpha:1,rotationY:l.rotate,top:0,z:10,scale:1,rotationX:c,delay:50*a/1e3,force3D:"auto",ease:v}),0),k.add(A)}),k.add(punchgs.TweenLite.set(h,{zIndex:18}),0)}if(20==a){if(setTimeout(function(){j.find(".defaultimg").css({opacity:0})},100),1==o)var ya=-l.width,wa=80,xa="20% 70% -"+l.height/2;else var ya=l.width,wa=-80,xa="80% 70% -"+l.height/2;i.find(".slotslide").each(function(a){var b=jQuery(this),c=50*a/1e3;k.add(punchgs.TweenLite.fromTo(b,t/1e3,{left:ya,rotationX:40,z:-600,opacity:fa,top:0,scale:1,force3D:"auto",transformPerspective:600,transformOrigin:xa,transformStyle:"flat",rotationY:wa},{left:0,rotationX:0,opacity:1,top:0,z:0,scale:1,rotationY:0,delay:c,ease:u}),0)}),j.find(".slotslide").each(function(a){var b=jQuery(this),c=50*a/1e3;if(c=a>0?c+t/9e3:0,1!=o)var d=-l.width/2,e=30,f="20% 70% -"+l.height/2;else var d=l.width/2,e=-30,f="80% 70% -"+l.height/2;v=punchgs.Power2.easeInOut,k.add(punchgs.TweenLite.fromTo(b,t/1e3,{opacity:1,rotationX:0,top:0,z:0,scale:1,left:0,force3D:"auto",transformPerspective:600,transformOrigin:f,transformStyle:"flat",rotationY:0},{opacity:1,rotationX:20,top:0,z:-600,left:d,force3D:"auto",rotationY:e,delay:c,ease:v}),0)})}if(21==a||25==a){setTimeout(function(){j.find(".defaultimg").css({opacity:0})},100);var wa=90,ya=-l.width,za=-wa;if(1==o)if(25==a){var xa="center top 0";wa=l.rotate}else{var xa="left center 0";za=l.rotate}else if(ya=l.width,wa=-90,25==a){var xa="center bottom 0";za=-wa,wa=l.rotate}else{var xa="right center 0";za=l.rotate}i.find(".slotslide").each(function(a){var b=jQuery(this),c=t/1.5/3;k.add(punchgs.TweenLite.fromTo(b,2*c/1e3,{left:0,transformStyle:"flat",rotationX:za,z:0,autoAlpha:0,top:0,scale:1,force3D:"auto",transformPerspective:1200,transformOrigin:xa,rotationY:wa},{left:0,rotationX:0,top:0,z:0,autoAlpha:1,scale:1,rotationY:0,force3D:"auto",delay:c/1e3,ease:u}),0)}),1!=o?(ya=-l.width,wa=90,25==a?(xa="center top 0",za=-wa,wa=l.rotate):(xa="left center 0",za=l.rotate)):(ya=l.width,wa=-90,25==a?(xa="center bottom 0",za=-wa,wa=l.rotate):(xa="right center 0",za=l.rotate)),j.find(".slotslide").each(function(a){var b=jQuery(this);k.add(punchgs.TweenLite.fromTo(b,t/1e3,{left:0,transformStyle:"flat",rotationX:0,z:0,autoAlpha:1,top:0,scale:1,force3D:"auto",transformPerspective:1200,transformOrigin:xa,rotationY:0},{left:0,rotationX:za,top:0,z:0,autoAlpha:1,force3D:"auto",scale:1,rotationY:wa,ease:v}),0)})}if(23==a||24==a){setTimeout(function(){j.find(".defaultimg").css({opacity:0})},100);var wa=-90,fa=1,Aa=0;if(1==o&&(wa=90),23==a){var xa="center center -"+l.width/2;fa=0}else var xa="center center "+l.width/2;punchgs.TweenLite.set(c,{transformStyle:"preserve-3d",backfaceVisibility:"hidden",perspective:2500}),i.find(".slotslide").each(function(a){var b=jQuery(this);k.add(punchgs.TweenLite.fromTo(b,t/1e3,{left:Aa,rotationX:l.rotate,force3D:"auto",opacity:fa,top:0,scale:1,transformPerspective:1200,transformOrigin:xa,rotationY:wa},{left:0,rotationX:0,autoAlpha:1,top:0,z:0,scale:1,rotationY:0,delay:50*a/500,ease:u}),0)}),wa=90,1==o&&(wa=-90),j.find(".slotslide").each(function(b){var c=jQuery(this);k.add(punchgs.TweenLite.fromTo(c,t/1e3,{left:0,rotationX:0,top:0,z:0,scale:1,force3D:"auto",transformStyle:"flat",transformPerspective:1200,transformOrigin:xa,rotationY:0},{left:Aa,rotationX:l.rotate,top:0,scale:1,rotationY:wa,delay:50*b/500,ease:v}),0),23==a&&k.add(punchgs.TweenLite.fromTo(c,t/2e3,{autoAlpha:1},{autoAlpha:0,delay:50*b/500+t/3e3,ease:v}),0)})}return k}}(jQuery); !function(a){"use strict";function f(a){return void 0==a?-1:jQuery.isNumeric(a)?a:a.split(":").length>1?60*parseInt(a.split(":")[0],0)+parseInt(a.split(":")[1],0):a}var b=jQuery.fn.revolution,c=b.is_mobile(),d=b.is_android(),e={alias:"Video Min JS",name:"revolution.extensions.video.min.js",min_core:"5.4.5",version:"2.1.6"};jQuery.extend(!0,b,{preLoadAudio:function(a,c){if("stop"===b.compare_version(e).check)return!1;a.find(".tp-audiolayer").each(function(){var a=jQuery(this),d={};0===a.find("audio").length&&(d.src=void 0!=a.data("videomp4")?a.data("videomp4"):"",d.pre=a.data("videopreload")||"",void 0===a.attr("id")&&a.attr("audio-layer-"+Math.round(199999*Math.random())),d.id=a.attr("id"),d.status="prepared",d.start=jQuery.now(),d.waittime=1e3*a.data("videopreloadwait")||5e3,"auto"!=d.pre&&"canplaythrough"!=d.pre&&"canplay"!=d.pre&&"progress"!=d.pre||(void 0===c.audioqueue&&(c.audioqueue=[]),c.audioqueue.push(d),b.manageVideoLayer(a,c)))})},preLoadAudioDone:function(a,b,c){b.audioqueue&&b.audioqueue.length>0&&jQuery.each(b.audioqueue,function(b,d){a.data("videomp4")!==d.src||d.pre!==c&&"auto"!==d.pre||(d.status="loaded")})},resetVideo:function(a,d,e){var g=a.data();switch(g.videotype){case"youtube":g.player;try{if("on"==g.forcerewind){var i=f(a.data("videostartat"));1===g.bgvideo||a.find(".tp-videoposter").length;void 0!=g.player&&(i=-1==i?0:i,g.player.seekTo(i),g.player.pauseVideo())}}catch(a){}0==a.find(".tp-videoposter").length&&1!==g.bgvideo&&!0!==e&&punchgs.TweenLite.to(a.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});break;case"vimeo":var l=$f(a.find("iframe").attr("id"));try{if("on"==g.forcerewind){var i=f(g.videostartat);1===g.bgvideo||a.find(".tp-videoposter").length;i=-1==i?0:i,l.api("seekTo",i),l.api("pause")}}catch(a){}0==a.find(".tp-videoposter").length&&1!==g.bgvideo&&!0!==e&&punchgs.TweenLite.to(a.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});break;case"html5":if(c&&1==g.disablevideoonmobile)return!1;var n="html5"==g.audio?"audio":"video",o=a.find(n),p=o[0];if(punchgs.TweenLite.to(o,.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),"on"==g.forcerewind&&!a.hasClass("videoisplaying"))try{var i=f(g.videostartat);p.currentTime=-1==i?0:i}catch(a){}("mute"==g.volume||b.lastToggleState(a.videomutetoggledby)||!0===d.globalmute)&&(p.muted=!0)}},isVideoMuted:function(a,b){var c=!1,d=a.data();switch(d.videotype){case"youtube":try{c=d.player.isMuted()}catch(a){}break;case"vimeo":try{$f(a.find("iframe").attr("id"));"mute"==d.volume&&(c=!0)}catch(a){}break;case"html5":var g="html5"==d.audio?"audio":"video";a.find(g)[0].muted&&(c=!0)}return c},muteVideo:function(a,b){var c=a.data();switch(c.videotype){case"youtube":try{c.player.mute()}catch(a){}break;case"vimeo":try{var e=$f(a.find("iframe").attr("id"));a.data("volume","mute"),e.api("setVolume",0)}catch(a){}break;case"html5":var f="html5"==c.audio?"audio":"video";a.find(f)[0].muted=!0}},unMuteVideo:function(a,b){if(!0!==b.globalmute){var c=a.data();switch(c.videotype){case"youtube":try{c.player.unMute()}catch(a){}break;case"vimeo":try{var e=$f(a.find("iframe").attr("id"));a.data("volume","1"),e.api("setVolume",1)}catch(a){}break;case"html5":var f="html5"==c.audio?"audio":"video";a.find(f)[0].muted=!1}}},stopVideo:function(a,b){var c=a.data();switch(b.leaveViewPortBasedStop||(b.lastplayedvideos=[]),b.leaveViewPortBasedStop=!1,c.videotype){case"youtube":try{var d=c.player;if(2===d.getPlayerState()||5===d.getPlayerState())return;d.pauseVideo(),c.youtubepausecalled=!0,setTimeout(function(){c.youtubepausecalled=!1},80)}catch(a){console.log("Issue at YouTube Video Pause:"),console.log(a)}break;case"vimeo":try{$f(a.find("iframe").attr("id")).api("pause"),c.vimeopausecalled=!0,setTimeout(function(){c.vimeopausecalled=!1},80)}catch(a){console.log("Issue at Vimeo Video Pause:"),console.log(a)}break;case"html5":var f="html5"==c.audio?"audio":"video",g=a.find(f),h=g[0];void 0!=g&&void 0!=h&&h.pause()}},playVideo:function(a,c){clearTimeout(a.data("videoplaywait"));var d=a.data();switch(d.videotype){case"youtube":if(0==a.find("iframe").length)a.append(a.data("videomarkup")),i(a,c,!0);else if(void 0!=d.player.playVideo){var e=f(a.data("videostartat")),h=d.player.getCurrentTime();1==a.data("nextslideatend-triggered")&&(h=-1,a.data("nextslideatend-triggered",0)),-1!=e&&e>h&&d.player.seekTo(e),!0!==d.youtubepausecalled&&d.player.playVideo()}else a.data("videoplaywait",setTimeout(function(){!0!==d.youtubepausecalled&&b.playVideo(a,c)},50));break;case"vimeo":if(0==a.find("iframe").length)a.append(a.data("videomarkup")),i(a,c,!0);else if(a.hasClass("rs-apiready")){var j=a.find("iframe").attr("id"),k=$f(j);void 0==k.api("play")?a.data("videoplaywait",setTimeout(function(){!0!==d.vimeopausecalled&&b.playVideo(a,c)},50)):setTimeout(function(){k.api("play");var b=f(a.data("videostartat")),c=a.data("currenttime");1==a.data("nextslideatend-triggered")&&(c=-1,a.data("nextslideatend-triggered",0)),-1!=b&&b>c&&k.api("seekTo",b)},510)}else a.data("videoplaywait",setTimeout(function(){!0!==d.vimeopausecalled&&b.playVideo(a,c)},50));break;case"html5":var l="html5"==d.audio?"audio":"video",m=a.find(l),n=m[0];if(1!=m.parent().data("metaloaded"))g(n,"loadedmetadata",function(a){b.resetVideo(a,c),n.play();var d=f(a.data("videostartat")),e=n.currentTime;1==a.data("nextslideatend-triggered")&&(e=-1,a.data("nextslideatend-triggered",0)),-1!=d&&d>e&&(n.currentTime=d)}(a));else{n.play();var e=f(a.data("videostartat")),h=n.currentTime;1==a.data("nextslideatend-triggered")&&(h=-1,a.data("nextslideatend-triggered",0)),-1!=e&&e>h&&(n.currentTime=e)}}},isVideoPlaying:function(a,b){var c=!1;return void 0!=b.playingvideos&&jQuery.each(b.playingvideos,function(b,d){a.attr("id")==d.attr("id")&&(c=!0)}),c},removeMediaFromList:function(a,b){n(a,b)},prepareCoveredVideo:function(a,c,d){var e=d.find("iframe, video"),f=a.split(":")[0],g=a.split(":")[1],h=d.closest(".tp-revslider-slidesli"),i=h.width()/h.height(),j=f/g,k=i/j*100,l=j/i*100;i>j?punchgs.TweenLite.to(e,.001,{height:k+"%",width:"100%",top:-(k-100)/2+"%",left:"0px",position:"absolute"}):punchgs.TweenLite.to(e,.001,{width:l+"%",height:"100%",left:-(l-100)/2+"%",top:"0px",position:"absolute"}),e.hasClass("resizelistener")||(e.addClass("resizelistener"),jQuery(window).resize(function(){clearTimeout(e.data("resizelistener")),e.data("resizelistener",setTimeout(function(){b.prepareCoveredVideo(a,c,d)},30))}))},checkVideoApis:function(a,b,c){location.protocol;if((void 0!=a.data("ytid")||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&(b.youtubeapineeded=!0),(void 0!=a.data("ytid")||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("youtube")>0)&&0==c.addedyt){b.youtubestarttime=jQuery.now(),c.addedyt=1;var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var f=document.getElementsByTagName("script")[0],g=!0;jQuery("head").find("*").each(function(){"https://www.youtube.com/iframe_api"==jQuery(this).attr("src")&&(g=!1)}),g&&f.parentNode.insertBefore(e,f)}if((void 0!=a.data("vimeoid")||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&(b.vimeoapineeded=!0),(void 0!=a.data("vimeoid")||a.find("iframe").length>0&&a.find("iframe").attr("src").toLowerCase().indexOf("vimeo")>0)&&0==c.addedvim){b.vimeostarttime=jQuery.now(),c.addedvim=1;var h=document.createElement("script"),f=document.getElementsByTagName("script")[0],g=!0;h.src="https://secure-a.vimeocdn.com/js/froogaloop2.min.js",jQuery("head").find("*").each(function(){"https://secure-a.vimeocdn.com/js/froogaloop2.min.js"==jQuery(this).attr("src")&&(g=!1)}),g&&f.parentNode.insertBefore(h,f)}return c},manageVideoLayer:function(a,d,h,j){if("stop"===b.compare_version(e).check)return!1;var k=a.data(),m=k.videoattributes,n=k.ytid,o=k.vimeoid,p="auto"===k.videopreload||"canplay"===k.videopreload||"canplaythrough"===k.videopreload||"progress"===k.videopreload?"auto":k.videopreload,q=k.videomp4,r=k.videowebm,s=k.videoogv,t=k.allowfullscreenvideo,u=k.videocontrols,v="http",w="loop"==k.videoloop?"loop":"loopandnoslidestop"==k.videoloop?"loop":"",x=void 0!=q||void 0!=r?"html5":void 0!=n&&String(n).length>1?"youtube":void 0!=o&&String(o).length>1?"vimeo":"none",y="html5"==k.audio?"audio":"video",z="html5"==x&&0==a.find(y).length?"html5":"youtube"==x&&0==a.find("iframe").length?"youtube":"vimeo"==x&&0==a.find("iframe").length?"vimeo":"none";switch(w=!0===k.nextslideatend?"":w,k.videotype=x,z){case"html5":"controls"!=u&&(u="");var y="video";"html5"==k.audio&&(y="audio",a.addClass("tp-audio-html5"));var A=d.fallbacks.allowHTML5AutoPlayOnAndroid?"muted playsinline":"",B="<"+y+" "+A+' style="object-fit:cover;background-size:cover;visible:hidden;width:100%; height:100%" class="" '+w+' preload="'+p+'">';"auto"==p&&(d.mediapreload=!0),void 0!=r&&"firefox"==b.get_browser().toLowerCase()&&(B=B+''),void 0!=q&&(B=B+''),void 0!=s&&(B=B+''),B=B+"";var C="";"true"!==t&&!0!==t||(C='
    '),"controls"==u&&(B=B+'
    '+C+"
    "),a.data("videomarkup",B),a.append(B),(c&&1==a.data("disablevideoonmobile")||b.isIE(8))&&a.find(y).remove(),a.find(y).each(function(c){var e=this,f=jQuery(this);f.parent().hasClass("html5vid")||f.wrap('
    '),1!=f.parent().data("metaloaded")&&g(e,"loadedmetadata",function(a){l(a,d),b.resetVideo(a,d)}(a))});break;case"youtube":v="https","none"==u&&(m=m.replace("controls=1","controls=0"),-1==m.toLowerCase().indexOf("controls")&&(m+="&controls=0")),!0!==k.videoinline&&"true"!==k.videoinline&&1!==k.videoinline||(m+="&playsinline=1");var D=f(a.data("videostartat")),E=f(a.data("videoendat"));-1!=D&&(m=m+"&start="+D),-1!=E&&(m=m+"&end="+E);var F=m.split("origin="+v+"://"),G="";F.length>1?(G=F[0]+"origin="+v+"://",self.location.href.match(/www/gi)&&!F[1].match(/www/gi)&&(G+="www."),G+=F[1]):G=m;var H="true"===t||!0===t?"allowfullscreen":"";a.data("videomarkup",'');break;case"vimeo":v="https",a.data("videomarkup",'')}var I=c&&"on"==a.data("noposteronmobile");if(void 0!=k.videoposter&&k.videoposter.length>2&&!I)0==a.find(".tp-videoposter").length&&a.append('
    '),0==a.find("iframe").length&&a.find(".tp-videoposter").click(function(){if(b.playVideo(a,d),c){if(1==a.data("disablevideoonmobile"))return!1;punchgs.TweenLite.to(a.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(a.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut})}});else{if(c&&1==a.data("disablevideoonmobile"))return!1;0!=a.find("iframe").length||"youtube"!=x&&"vimeo"!=x||(a.append(a.data("videomarkup")),i(a,d,!1))}"none"!=a.data("dottedoverlay")&&void 0!=a.data("dottedoverlay")&&1!=a.find(".tp-dottedoverlay").length&&a.append('
    '),a.addClass("HasListener"),1==a.data("bgvideo")&&punchgs.TweenLite.set(a.find("video, iframe"),{autoAlpha:0})}});var g=function(a,b,c){a.addEventListener?a.addEventListener(b,c,{capture:!1,passive:!0}):a.attachEvent(b,c,{capture:!1,passive:!0})},h=function(a,b,c){var d={};return d.video=a,d.videotype=b,d.settings=c,d},i=function(a,d,e){var g=a.data(),i=a.find("iframe"),l="iframe"+Math.round(1e5*Math.random()+1),o=g.videoloop,p="loopandnoslidestop"!=o;if(o="loop"==o||"loopandnoslidestop"==o,1==a.data("forcecover")){a.removeClass("fullscreenvideo").addClass("coverscreenvideo");var q=a.data("aspectratio");void 0!=q&&q.split(":").length>1&&(console.log("i"),b.prepareCoveredVideo(q,d,a))}if(1==a.data("bgvideo")){var q=a.data("aspectratio");void 0!=q&&q.split(":").length>1&&(console.log("ak"),b.prepareCoveredVideo(q,d,a))}if(i.attr("id",l),e&&a.data("startvideonow",!0),1!==a.data("videolistenerexist"))switch(g.videotype){case"youtube":var r=new YT.Player(l,{events:{onStateChange:function(c){var e=a.closest(".tp-simpleresponsive"),q=(g.videorate,a.data("videostart"),k());if(c.data==YT.PlayerState.PLAYING)punchgs.TweenLite.to(a.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(a.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),"mute"==a.data("volume")||b.lastToggleState(a.data("videomutetoggledby"))||!0===d.globalmute?r.mute():(r.unMute(),r.setVolume(parseInt(a.data("volume"),0)||75)),d.videoplaying=!0,m(a,d),p?d.c.trigger("stoptimer"):d.videoplaying=!1,d.c.trigger("revolution.slide.onvideoplay",h(r,"youtube",a.data())),b.toggleState(g.videotoggledby);else{if(0==c.data&&o){var s=f(a.data("videostartat"));-1!=s&&r.seekTo(s),r.playVideo(),b.toggleState(g.videotoggledby)}q||0!=c.data&&2!=c.data||!("on"==a.data("showcoveronpause")&&a.find(".tp-videoposter").length>0||1===a.data("bgvideo")&&a.find(".rs-fullvideo-cover").length>0)||(1===a.data("bgvideo")?punchgs.TweenLite.to(a.find(".rs-fullvideo-cover"),.1,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}):punchgs.TweenLite.to(a.find(".tp-videoposter"),.1,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(a.find("iframe"),.1,{autoAlpha:0,ease:punchgs.Power3.easeInOut})),-1!=c.data&&3!=c.data&&(d.videoplaying=!1,d.tonpause=!1,n(a,d),e.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",h(r,"youtube",a.data())),void 0!=d.currentLayerVideoIsPlaying&&d.currentLayerVideoIsPlaying.attr("id")!=a.attr("id")||b.unToggleState(g.videotoggledby)),0==c.data&&1==a.data("nextslideatend")?(j(),a.data("nextslideatend-triggered",1),d.c.revnext(),n(a,d)):(n(a,d),d.videoplaying=!1,e.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",h(r,"youtube",a.data())),void 0!=d.currentLayerVideoIsPlaying&&d.currentLayerVideoIsPlaying.attr("id")!=a.attr("id")||b.unToggleState(g.videotoggledby))}},onReady:function(b){var d=g.videorate;a.data("videostart");if(a.addClass("rs-apiready"),void 0!=d&&b.target.setPlaybackRate(parseFloat(d)),a.find(".tp-videoposter").unbind("click"),a.find(".tp-videoposter").click(function(){c||r.playVideo()}),a.data("startvideonow")){g.player.playVideo();var h=f(a.data("videostartat"));-1!=h&&g.player.seekTo(h)}a.data("videolistenerexist",1)}}});a.data("player",r);break;case"vimeo":for(var w,s=i.attr("src"),t={},u=s,v=/([^&=]+)=([^&]*)/g;w=v.exec(u);)t[decodeURIComponent(w[1])]=decodeURIComponent(w[2]);s=void 0!=t.player_id?s.replace(t.player_id,l):s+"&player_id="+l;try{s=s.replace("api=0","api=1")}catch(a){}s+="&api=1",i.attr("src",s);var r=a.find("iframe")[0],y=(jQuery("#"+l),$f(l));y.addEvent("ready",function(){if(a.addClass("rs-apiready"),y.addEvent("play",function(c){a.data("nextslidecalled",0),punchgs.TweenLite.to(a.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(a.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),d.c.trigger("revolution.slide.onvideoplay",h(y,"vimeo",a.data())),d.videoplaying=!0,m(a,d),p?d.c.trigger("stoptimer"):d.videoplaying=!1,"mute"==a.data("volume")||b.lastToggleState(a.data("videomutetoggledby"))||!0===d.globalmute?y.api("setVolume","0"):y.api("setVolume",parseInt(a.data("volume"),0)/100||.75),b.toggleState(g.videotoggledby)}),y.addEvent("playProgress",function(b){var c=f(a.data("videoendat"));if(a.data("currenttime",b.seconds),0!=c&&Math.abs(c-b.seconds)<.3&&c>b.seconds&&1!=a.data("nextslidecalled"))if(o){y.api("play");var e=f(a.data("videostartat"));-1!=e&&y.api("seekTo",e)}else 1==a.data("nextslideatend")&&(a.data("nextslideatend-triggered",1),a.data("nextslidecalled",1),d.c.revnext()),y.api("pause")}),y.addEvent("finish",function(c){n(a,d),d.videoplaying=!1,d.c.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",h(y,"vimeo",a.data())),1==a.data("nextslideatend")&&(a.data("nextslideatend-triggered",1),d.c.revnext()),void 0!=d.currentLayerVideoIsPlaying&&d.currentLayerVideoIsPlaying.attr("id")!=a.attr("id")||b.unToggleState(g.videotoggledby)}),y.addEvent("pause",function(c){("on"==a.data("showcoveronpause")&&a.find(".tp-videoposter").length>0||1===a.data("bgvideo")&&a.find(".rs-fullvideo-cover").length>0)&&(1===a.data("bgvideo")?punchgs.TweenLite.to(a.find(".rs-fullvideo-cover"),.1,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}):punchgs.TweenLite.to(a.find(".tp-videoposter"),.1,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(a.find("iframe"),.1,{autoAlpha:0,ease:punchgs.Power3.easeInOut})),d.videoplaying=!1,d.tonpause=!1,n(a,d),d.c.trigger("starttimer"),d.c.trigger("revolution.slide.onvideostop",h(y,"vimeo",a.data())),void 0!=d.currentLayerVideoIsPlaying&&d.currentLayerVideoIsPlaying.attr("id")!=a.attr("id")||b.unToggleState(g.videotoggledby)}),a.find(".tp-videoposter").unbind("click"),a.find(".tp-videoposter").click(function(){if(!c)return y.api("play"),!1}),a.data("startvideonow")){y.api("play");var e=f(a.data("videostartat"));-1!=e&&y.api("seekTo",e)}a.data("videolistenerexist",1)})}else{var z=f(a.data("videostartat"));switch(g.videotype){case"youtube":e&&(g.player.playVideo(),-1!=z&&g.player.seekTo());break;case"vimeo":if(e){var y=$f(a.find("iframe").attr("id"));y.api("play"),-1!=z&&y.api("seekTo",z)}}}},j=function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},k=function(){try{if(void 0!==window.fullScreen)return window.fullScreen;var a=5;return jQuery.browser.webkit&&/Apple Computer/.test(navigator.vendor)&&(a=42),screen.width==window.innerWidth&&Math.abs(screen.height-window.innerHeight) '),a.find("video, .tp-poster, .tp-video-play-button").click(function(){a.hasClass("videoisplaying")?q.pause():q.play()})),1==a.data("forcecover")||a.hasClass("fullscreenvideo")||1==a.data("bgvideo"))if(1==a.data("forcecover")||1==a.data("bgvideo")){r.addClass("fullcoveredvideo");var u=a.data("aspectratio")||"4:3";b.setSize(e),b.prepareCoveredVideo(u,e,a)}else r.addClass("fullscreenvideo");var v=a.find(".tp-vid-play-pause")[0],w=a.find(".tp-vid-mute")[0],x=a.find(".tp-vid-full-screen")[0],y=a.find(".tp-seek-bar")[0],z=a.find(".tp-volume-bar")[0];void 0!=v&&g(v,"click",function(){1==q.paused?q.play():q.pause()}),void 0!=w&&g(w,"click",function(){0==q.muted?(q.muted=!0,w.innerHTML="Unmute"):(q.muted=!1,w.innerHTML="Mute")}),void 0!=x&&x&&g(x,"click",function(){q.requestFullscreen?q.requestFullscreen():q.mozRequestFullScreen?q.mozRequestFullScreen():q.webkitRequestFullscreen&&q.webkitRequestFullscreen()}),void 0!=y&&(g(y,"change",function(){var a=q.duration*(y.value/100);q.currentTime=a}),g(y,"mousedown",function(){a.addClass("seekbardragged"),q.pause()}),g(y,"mouseup",function(){a.removeClass("seekbardragged"),q.play()})),g(q,"canplaythrough",function(){b.preLoadAudioDone(a,e,"canplaythrough")}),g(q,"canplay",function(){b.preLoadAudioDone(a,e,"canplay")}),g(q,"progress",function(){b.preLoadAudioDone(a,e,"progress")}),g(q,"timeupdate",function(){var b=100/q.duration*q.currentTime,c=f(a.data("videoendat")),d=q.currentTime;if(void 0!=y&&(y.value=b),0!=c&&-1!=c&&Math.abs(c-d)<=.3&&c>d&&1!=a.data("nextslidecalled"))if(s){q.play();var g=f(a.data("videostartat"));-1!=g&&(q.currentTime=g)}else 1==a.data("nextslideatend")&&(a.data("nextslideatend-triggered",1),a.data("nextslidecalled",1),e.just_called_nextslide_at_htmltimer=!0,e.c.revnext(),setTimeout(function(){e.just_called_nextslide_at_htmltimer=!1},1e3)),q.pause()}),void 0!=z&&g(z,"change",function(){q.volume=z.value}),g(q,"play",function(){a.data("nextslidecalled",0);var c=a.data("volume");c=void 0!=c&&"mute"!=c?parseFloat(c)/100:c,d||(!0===e.globalmute?q.muted=!0:q.muted=!1,c>1&&(c/=100),"mute"==c?q.muted=!0:void 0!=c&&(q.volume=c)),a.addClass("videoisplaying");var f="html5"==l.audio?"audio":"video";m(a,e),t&&"audio"!=f?(e.videoplaying=!0,e.c.trigger("stoptimer"),e.c.trigger("revolution.slide.onvideoplay",h(q,"html5",l))):(e.videoplaying=!1,"audio"!=f&&e.c.trigger("starttimer"),e.c.trigger("revolution.slide.onvideostop",h(q,"html5",l))),punchgs.TweenLite.to(a.find(".tp-videoposter"),.3,{autoAlpha:0,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(a.find(f),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});var g=a.find(".tp-vid-play-pause")[0],i=a.find(".tp-vid-mute")[0];void 0!=g&&(g.innerHTML="Pause"),void 0!=i&&q.muted&&(i.innerHTML="Unmute"),b.toggleState(l.videotoggledby)}),g(q,"pause",function(c){var d="html5"==l.audio?"audio":"video";!k()&&a.find(".tp-videoposter").length>0&&"on"==a.data("showcoveronpause")&&!a.hasClass("seekbardragged")&&(punchgs.TweenLite.to(a.find(".tp-videoposter"),.3,{autoAlpha:1,force3D:"auto",ease:punchgs.Power3.easeInOut}),punchgs.TweenLite.to(a.find(d),.3,{autoAlpha:0,ease:punchgs.Power3.easeInOut})),a.removeClass("videoisplaying"),e.videoplaying=!1,n(a,e),"audio"!=d&&e.c.trigger("starttimer"),e.c.trigger("revolution.slide.onvideostop",h(q,"html5",a.data()));var g=a.find(".tp-vid-play-pause")[0];void 0!=g&&(g.innerHTML="Play"),void 0!=e.currentLayerVideoIsPlaying&&e.currentLayerVideoIsPlaying.attr("id")!=a.attr("id")||b.unToggleState(l.videotoggledby)}),g(q,"ended",function(){j(),n(a,e),e.videoplaying=!1,n(a,e),"audio"!=o&&e.c.trigger("starttimer"),e.c.trigger("revolution.slide.onvideostop",h(q,"html5",a.data())),!0===a.data("nextslideatend")&&q.currentTime>0&&(1==!e.just_called_nextslide_at_htmltimer&&(a.data("nextslideatend-triggered",1),e.c.revnext(),e.just_called_nextslide_at_htmltimer=!0),setTimeout(function(){e.just_called_nextslide_at_htmltimer=!1},1500)),a.removeClass("videoisplaying")})},m=function(a,c){void 0==c.playingvideos&&(c.playingvideos=new Array),a.data("stopallvideos")&&void 0!=c.playingvideos&&c.playingvideos.length>0&&(c.lastplayedvideos=jQuery.extend(!0,[],c.playingvideos),jQuery.each(c.playingvideos,function(a,d){b.stopVideo(d,c)})),c.playingvideos.push(a),c.currentLayerVideoIsPlaying=a},n=function(a,b){void 0!=b.playingvideos&&jQuery.inArray(a,b.playingvideos)>=0&&b.playingvideos.splice(jQuery.inArray(a,b.playingvideos),1)}}(jQuery); !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u$1").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")}function f(a,b){return'
    '+b+"
    "}var g=function(){return{escapeRegExChars:function(a){return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(a){var b=document.createElement("div");return b.className=a,b.style.position="absolute",b.style.display="none",b}}}(),h={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40},i=a.noop;b.utils=g,a.Autocomplete=b,b.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:e,formatGroup:f,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:i,onSearchComplete:i,onSearchError:i,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:c,paramName:"query",transformResult:d,showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1},b.prototype={initialize:function(){var c,d=this,e="."+d.classes.suggestion,f=d.classes.selected,g=d.options;d.element.setAttribute("autocomplete","off"),d.noSuggestionsContainer=a('
    ').html(this.options.noSuggestionNotice).get(0),d.suggestionsContainer=b.utils.createNode(g.containerClass),c=a(d.suggestionsContainer),c.appendTo(g.appendTo||"body"),"auto"!==g.width&&c.css("width",g.width),c.on("mouseover.autocomplete",e,function(){d.activate(a(this).data("index"))}),c.on("mouseout.autocomplete",function(){d.selectedIndex=-1,c.children("."+f).removeClass(f)}),c.on("click.autocomplete",e,function(){d.select(a(this).data("index"))}),c.on("click.autocomplete",function(){clearTimeout(d.blurTimeoutId)}),d.fixPositionCapture=function(){d.visible&&d.fixPosition()},a(window).on("resize.autocomplete",d.fixPositionCapture),d.el.on("keydown.autocomplete",function(a){d.onKeyPress(a)}),d.el.on("keyup.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("blur.autocomplete",function(){d.onBlur()}),d.el.on("focus.autocomplete",function(){d.onFocus()}),d.el.on("change.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("input.autocomplete",function(a){d.onKeyUp(a)})},onFocus:function(){var a=this;a.fixPosition(),a.el.val().length>=a.options.minChars&&a.onValueChange()},onBlur:function(){var a=this;a.blurTimeoutId=setTimeout(function(){a.hide()},200)},abortAjax:function(){var a=this;a.currentRequest&&(a.currentRequest.abort(),a.currentRequest=null)},setOptions:function(b){var c=this,d=a.extend({},c.options,b);c.isLocal=Array.isArray(d.lookup),c.isLocal&&(d.lookup=c.verifySuggestionsFormat(d.lookup)),d.orientation=c.validateOrientation(d.orientation,"bottom"),a(c.suggestionsContainer).css({"max-height":d.maxHeight+"px",width:d.width+"px","z-index":d.zIndex}),this.options=d},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var a=this;a.disabled=!0,clearTimeout(a.onChangeTimeout),a.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var b=this,c=a(b.suggestionsContainer),d=c.parent().get(0);if(d===document.body||b.options.forceFixPosition){var e=b.options.orientation,f=c.outerHeight(),g=b.el.outerHeight(),h=b.el.offset(),i={top:h.top,left:h.left};if("auto"===e){var j=a(window).height(),k=a(window).scrollTop(),l=-k+h.top-f,m=k+j-(h.top+g+f);e=Math.max(l,m)===l?"top":"bottom"}if("top"===e?i.top+=-f:i.top+=g,d!==document.body){var n,o=c.css("opacity");b.visible||c.css("opacity",0).show(),n=c.offsetParent().offset(),i.top-=n.top,i.top+=d.scrollTop,i.left-=n.left,b.visible||c.css("opacity",o).hide()}"auto"===b.options.width&&(i.width=b.el.outerWidth()+"px"),c.css(i)}},isCursorAtEnd:function(){var a,b=this,c=b.el.val().length,d=b.element.selectionStart;return"number"==typeof d?d===c:!document.selection||(a=document.selection.createRange(),a.moveStart("character",-c),c===a.text.length)},onKeyPress:function(a){var b=this;if(!b.disabled&&!b.visible&&a.which===h.DOWN&&b.currentValue)return void b.suggest();if(!b.disabled&&b.visible){switch(a.which){case h.ESC:b.el.val(b.currentValue),b.hide();break;case h.RIGHT:if(b.hint&&b.options.onHint&&b.isCursorAtEnd()){b.selectHint();break}return;case h.TAB:if(b.hint&&b.options.onHint)return void b.selectHint();if(b.selectedIndex===-1)return void b.hide();if(b.select(b.selectedIndex),b.options.tabDisabled===!1)return;break;case h.RETURN:if(b.selectedIndex===-1)return void b.hide();b.select(b.selectedIndex);break;case h.UP:b.moveUp();break;case h.DOWN:b.moveDown();break;default:return}a.stopImmediatePropagation(),a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case h.UP:case h.DOWN:return}clearTimeout(b.onChangeTimeout),b.currentValue!==b.el.val()&&(b.findBestHint(),b.options.deferRequestBy>0?b.onChangeTimeout=setTimeout(function(){b.onValueChange()},b.options.deferRequestBy):b.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)return void(this.ignoreValueChange=!1);var b=this,c=b.options,d=b.el.val(),e=b.getQuery(d);return b.selection&&b.currentValue!==e&&(b.selection=null,(c.onInvalidateSelection||a.noop).call(b.element)),clearTimeout(b.onChangeTimeout),b.currentValue=d,b.selectedIndex=-1,c.triggerSelectOnValidInput&&b.isExactMatch(e)?void b.select(0):void(e.lengthh&&(c.suggestions=c.suggestions.slice(0,h)),c},getSuggestions:function(b){var c,d,e,f,g=this,h=g.options,i=h.serviceUrl;if(h.params[h.paramName]=b,h.onSearchStart.call(g.element,h.params)!==!1){if(d=h.ignoreParams?null:h.params,a.isFunction(h.lookup))return void h.lookup(b,function(a){g.suggestions=a.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,a.suggestions)});g.isLocal?c=g.getSuggestionsLocal(b):(a.isFunction(i)&&(i=i.call(g.element,b)),e=i+"?"+a.param(d||{}),c=g.cachedResponse[e]),c&&Array.isArray(c.suggestions)?(g.suggestions=c.suggestions,g.suggest(),h.onSearchComplete.call(g.element,b,c.suggestions)):g.isBadQuery(b)?h.onSearchComplete.call(g.element,b,[]):(g.abortAjax(),f={url:i,data:d,type:h.type,dataType:h.dataType},a.extend(f,h.ajaxSettings),g.currentRequest=a.ajax(f).done(function(a){var c;g.currentRequest=null,c=h.transformResult(a,b),g.processResponse(c,b,e),h.onSearchComplete.call(g.element,b,c.suggestions)}).fail(function(a,c,d){h.onSearchError.call(g.element,b,a,c,d)}))}},isBadQuery:function(a){if(!this.options.preventBadQueries)return!1;for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){var b=this,c=a(b.suggestionsContainer);a.isFunction(b.options.onHide)&&b.visible&&b.options.onHide.call(b.element,c),b.visible=!1,b.selectedIndex=-1,clearTimeout(b.onChangeTimeout),a(b.suggestionsContainer).hide(),b.signalHint(null)},suggest:function(){if(!this.suggestions.length)return void(this.options.showNoSuggestionNotice?this.noSuggestions():this.hide());var b,c=this,d=c.options,e=d.groupBy,f=d.formatResult,g=c.getQuery(c.currentValue),h=c.classes.suggestion,i=c.classes.selected,j=a(c.suggestionsContainer),k=a(c.noSuggestionsContainer),l=d.beforeRender,m="",n=function(a,c){var f=a.data[e];return b===f?"":(b=f,d.formatGroup(a,b))};return d.triggerSelectOnValidInput&&c.isExactMatch(g)?void c.select(0):(a.each(c.suggestions,function(a,b){e&&(m+=n(b,g,a)),m+='
    '+f(b,g,a)+"
    "}),this.adjustContainerWidth(),k.detach(),j.html(m),a.isFunction(l)&&l.call(c.element,j,c.suggestions),c.fixPosition(),j.show(),d.autoSelectFirst&&(c.selectedIndex=0,j.scrollTop(0),j.children("."+h).first().addClass(i)),c.visible=!0,void c.findBestHint())},noSuggestions:function(){var b=this,c=b.options.beforeRender,d=a(b.suggestionsContainer),e=a(b.noSuggestionsContainer);this.adjustContainerWidth(),e.detach(),d.empty(),d.append(e),a.isFunction(c)&&c.call(b.element,d,b.suggestions),b.fixPosition(),d.show(),b.visible=!0},adjustContainerWidth:function(){var b,c=this,d=c.options,e=a(c.suggestionsContainer);"auto"===d.width?(b=c.el.outerWidth(),e.css("width",b>0?b:300)):"flex"===d.width&&e.css("width","")},findBestHint:function(){var b=this,c=b.el.val().toLowerCase(),d=null;c&&(a.each(b.suggestions,function(a,b){var e=0===b.value.toLowerCase().indexOf(c);return e&&(d=b),!e}),b.signalHint(d))},signalHint:function(b){var c="",d=this;b&&(c=d.currentValue+b.value.substr(d.currentValue.length)),d.hintValue!==c&&(d.hintValue=c,d.hint=b,(this.options.onHint||a.noop)(c))},verifySuggestionsFormat:function(b){return b.length&&"string"==typeof b[0]?a.map(b,function(a){return{value:a,data:null}}):b},validateOrientation:function(b,c){return b=a.trim(b||"").toLowerCase(),a.inArray(b,["auto","bottom","top"])===-1&&(b=c),b},processResponse:function(a,b,c){var d=this,e=d.options;a.suggestions=d.verifySuggestionsFormat(a.suggestions),e.noCache||(d.cachedResponse[c]=a,e.preventBadQueries&&!a.suggestions.length&&d.badQueries.push(b)),b===d.getQuery(d.currentValue)&&(d.suggestions=a.suggestions,d.suggest())},activate:function(b){var c,d=this,e=d.classes.selected,f=a(d.suggestionsContainer),g=f.find("."+d.classes.suggestion);return f.find("."+e).removeClass(e),d.selectedIndex=b,d.selectedIndex!==-1&&g.length>d.selectedIndex?(c=g.get(d.selectedIndex),a(c).addClass(e),c):null},selectHint:function(){var b=this,c=a.inArray(b.hint,b.suggestions);b.select(c)},select:function(a){var b=this;b.hide(),b.onSelect(a)},moveUp:function(){var b=this;if(b.selectedIndex!==-1)return 0===b.selectedIndex?(a(b.suggestionsContainer).children("."+b.classes.suggestion).first().removeClass(b.classes.selected),b.selectedIndex=-1,b.ignoreValueChange=!1,b.el.val(b.currentValue),void b.findBestHint()):void b.adjustScroll(b.selectedIndex-1)},moveDown:function(){var a=this;a.selectedIndex!==a.suggestions.length-1&&a.adjustScroll(a.selectedIndex+1)},adjustScroll:function(b){var c=this,d=c.activate(b);if(d){var e,f,g,h=a(d).outerHeight();e=d.offsetTop,f=a(c.suggestionsContainer).scrollTop(),g=f+c.options.maxHeight-h,eg&&a(c.suggestionsContainer).scrollTop(e-c.options.maxHeight+h),c.options.preserveInput||(c.ignoreValueChange=!0,c.el.val(c.getValue(c.suggestions[b].value))),c.signalHint(null)}},onSelect:function(b){var c=this,d=c.options.onSelect,e=c.suggestions[b];c.currentValue=c.getValue(e.value),c.currentValue===c.el.val()||c.options.preserveInput||c.el.val(c.currentValue),c.signalHint(null),c.suggestions=[],c.selection=e,a.isFunction(d)&&d.call(c.element,e)},getValue:function(a){var b,c,d=this,e=d.options.delimiter;return e?(b=d.currentValue,c=b.split(e),1===c.length?a:b.substr(0,b.length-c[c.length-1].length)+a):a},dispose:function(){var b=this;b.el.off(".autocomplete").removeData("autocomplete"),a(window).off("resize.autocomplete",b.fixPositionCapture),a(b.suggestionsContainer).remove()}},a.fn.devbridgeAutocomplete=function(c,d){var e="autocomplete";return arguments.length?this.each(function(){var f=a(this),g=f.data(e);"string"==typeof c?g&&"function"==typeof g[c]&&g[c](d):(g&&g.dispose&&g.dispose(),g=new b(this,c),f.data(e,g))}):this.first().data(e)},a.fn.autocomplete||(a.fn.autocomplete=a.fn.devbridgeAutocomplete)}); jQuery(document).ready(function($){ 'use strict'; $('.searchform').each(function(){ var $this=$(this), appendTo=$this.find('.live-search-list'), searchCats=$this.find('#cat'), serviceUrl=theme.ajax_url + '?action=porto_ajax_search_posts'; if(searchCats.length&&searchCats.val()&&searchCats.val()!='0'){ serviceUrl +='&cat=' + searchCats.val(); } if($this.find('input[name="post_type"]').length&&$this.find('input[name="post_type"]').val()){ serviceUrl +='&post_type=' + $this.find('input[name="post_type"]').val(); } $this.find('input[type="text"]').devbridgeAutocomplete({ minChars: 3, appendTo: appendTo, triggerSelectOnValidInput: false, serviceUrl: serviceUrl, onSearchStart: function (){ $this.find('button').addClass('loading'); }, onSelect: function (item){ if(item.id!=-1){ window.location.href=item.url; }}, onSearchComplete: function (){ $this.find('button').removeClass('loading'); }, beforeRender: function (container){ $(container).removeAttr('style'); }, formatResult: function (item, currentValue){ console.log(item); var pattern='(' + $.Autocomplete.utils.escapeRegExChars(currentValue) + ')', html=''; if(item.img){ html +=''; } html +='
    ' + item.value.replace(new RegExp(pattern, 'gi'), '$1<\/strong>') + '
    '; if(item.price){ html +='' + item.price + ''; } return html; }}); if(searchCats.length){ var searchForm=$this.find('input[type="text"]').devbridgeAutocomplete(); searchCats.on('change', function(e){ if(searchCats.val()&&searchCats.val()!='0'){ searchForm.setOptions({ serviceUrl: theme.ajax_url + '?action=porto_ajax_search_posts&cat=' + searchCats.val() }); }else{ searchForm.setOptions({ serviceUrl: theme.ajax_url + '?action=porto_ajax_search_posts' }); } searchForm.hide(); searchForm.onValueChange(); }); }}); }); var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this); window.wp=window.wp||{},function(a){var b="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(b){var c,d={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(c=c||_.template(a("#tmpl-"+b).html(),d))(e)}}),wp.ajax={settings:b.ajax||{},post:function(a,b){return wp.ajax.send({data:_.isObject(a)?a:_.extend(b||{},{action:a})})},send:function(b,c){var d,e;return _.isObject(b)?c=b:(c=c||{},c.data=_.extend(c.data||{},{action:b})),c=_.defaults(c||{},{type:"POST",url:wp.ajax.settings.url,context:this}),e=a.Deferred(function(b){c.success&&b.done(c.success),c.error&&b.fail(c.error),delete c.success,delete c.error,b.jqXHR=a.ajax(c).done(function(a){"1"!==a&&1!==a||(a={success:!0}),_.isObject(a)&&!_.isUndefined(a.success)?b[a.success?"resolveWith":"rejectWith"](this,[a.data]):b.rejectWith(this,[a])}).fail(function(){b.rejectWith(this,arguments)})}),d=e.promise(),d.abort=function(){return e.jqXHR.abort(),this},d}}}(jQuery); !function(b,d,r,n){var t=function(t){var a=this;a.$form=t,a.$attributeFields=t.find(".variations select"),a.$singleVariation=t.find(".single_variation"),a.$singleVariationWrap=t.find(".single_variation_wrap"),a.$resetVariations=t.find(".reset_variations"),a.$product=t.closest(".product"),a.variationData=t.data("product_variations"),a.useAjax=!1===a.variationData,a.xhr=!1,a.loading=!0,a.$singleVariationWrap.show(),a.$form.off(".wc-variation-form"),a.getChosenAttributes=a.getChosenAttributes.bind(a),a.findMatchingVariations=a.findMatchingVariations.bind(a),a.isMatch=a.isMatch.bind(a),a.toggleResetLink=a.toggleResetLink.bind(a),t.on("click.wc-variation-form",".reset_variations",{variationForm:a},a.onReset),t.on("reload_product_variations",{variationForm:a},a.onReload),t.on("hide_variation",{variationForm:a},a.onHide),t.on("show_variation",{variationForm:a},a.onShow),t.on("click",".single_add_to_cart_button",{variationForm:a},a.onAddToCart),t.on("reset_data",{variationForm:a},a.onResetDisplayedVariation),t.on("reset_image",{variationForm:a},a.onResetImage),t.on("change.wc-variation-form",".variations select",{variationForm:a},a.onChange),t.on("found_variation.wc-variation-form",{variationForm:a},a.onFoundVariation),t.on("check_variations.wc-variation-form",{variationForm:a},a.onFindVariation),t.on("update_variation_values.wc-variation-form",{variationForm:a},a.onUpdateAttributes),setTimeout(function(){t.trigger("check_variations"),t.trigger("wc_variation_form"),a.loading=!1},100)};t.prototype.onReset=function(t){t.preventDefault(),t.data.variationForm.$attributeFields.val("").change(),t.data.variationForm.$form.trigger("reset_data")},t.prototype.onReload=function(t){var a=t.data.variationForm;a.variationData=a.$form.data("product_variations"),a.useAjax=!1===a.variationData,a.$form.trigger("check_variations")},t.prototype.onHide=function(t){t.preventDefault(),t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},t.prototype.onShow=function(t,a,i){t.preventDefault(),i?(t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled"))},t.prototype.onAddToCart=function(t){b(this).is(".disabled")&&(t.preventDefault(),b(this).is(".wc-variation-is-unavailable")?d.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):b(this).is(".wc-variation-selection-needed")&&d.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},t.prototype.onResetDisplayedVariation=function(t){var a=t.data.variationForm;a.$product.find(".product_meta").find(".sku").wc_reset_content(),a.$product.find(".product_weight").wc_reset_content(),a.$product.find(".product_dimensions").wc_reset_content(),a.$form.trigger("reset_image"),a.$singleVariation.slideUp(200).trigger("hide_variation")},t.prototype.onResetImage=function(t){t.data.variationForm.$form.wc_variations_image_update(!1)},t.prototype.onFindVariation=function(t){var a=t.data.variationForm,i=a.getChosenAttributes(),r=i.data;if(i.count===i.chosenCount)if(a.useAjax)a.xhr&&a.xhr.abort(),a.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),r.product_id=parseInt(a.$form.data("product_id"),10),r.custom_data=a.$form.data("custom_data"),a.xhr=b.ajax({url:wc_add_to_cart_variation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:r,success:function(t){t?a.$form.trigger("found_variation",[t]):(a.$form.trigger("reset_data"),i.chosenCount=0,a.loading||(a.$form.find(".single_variation").after('

    '+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"

    "),a.$form.find(".wc-no-matching-variations").slideDown(200)))},complete:function(){a.$form.unblock()}});else{a.$form.trigger("update_variation_values");var e=a.findMatchingVariations(a.variationData,r).shift();e?a.$form.trigger("found_variation",[e]):(a.$form.trigger("reset_data"),i.chosenCount=0,a.loading||(a.$form.find(".single_variation").after('

    '+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"

    "),a.$form.find(".wc-no-matching-variations").slideDown(200)))}else a.$form.trigger("update_variation_values"),a.$form.trigger("reset_data");a.toggleResetLink(0"),_=r.val()||"",c=!0;if(!r.data("attribute_html")){var d=r.clone();d.find("option").removeAttr("disabled attached").removeAttr("selected"),r.data("attribute_options",d.find("option"+n).get()),r.data("attribute_html",d.html())}s.html(r.data("attribute_html"));var m=b.extend(!0,{},w);m[e]="";var v=p.findMatchingVariations(p.variationData,m);for(var l in v)if("undefined"!=typeof v[l]){var g=v[l].attributes;for(var f in g)if(g.hasOwnProperty(f)){var u=g[f],h="";f===e&&(v[l].variation_is_active&&(h="enabled"),u?(u=b("
    ").html(u).text(),s.find('option[value="'+p.addSlashes(u)+'"]').addClass("attached "+h)):s.find("option:gt(0)").addClass("attached "+h))}}i=s.find("option.attached").length,!_||0!==i&&0!==s.find('option.attached.enabled[value="'+p.addSlashes(_)+'"]').length||(c=!1),0screen_w?"desktop":768screen_w?"tablet":300screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){"loaded"!==script.readyState&&"complete"!==script.readyState||(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery("[data-vc-video-bg]").each(function(){var youtubeUrl,youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeUrl=$element.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('
    ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(iframeW=containerW,iframeH=containerW*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px",iframeW+="px",iframeH+="px"),$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),width=$this.width(),perspective=4*width+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=frontHeight>backHeight?frontHeight:backHeight;hoverBoxHeight<250&&(hoverBoxHeight=250),hoverBoxInner.css("min-height",hoverBoxHeight+"px")})}function vc_prepareHoverBox(){var hoverBox=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(hoverBox),vc_setHoverBoxPerspective(hoverBox)}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&0index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1");var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){location.href.indexOf("#!prettyPhoto")>-1&&(location.hash="")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");if($el_full.length||($el_full=$el.parent().next(".vc_row-full-width")),$el_full.length){var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden"),$(document).trigger("vc-full-width-row-single",{el:$el,offset:offset,marginLeft:el_margin_left,marginRight:el_margin_right,elFull:$el_full,width:width})}}),$(document).trigger("vc-full-width-row",$elements)}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,offsetTop0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('
    ')})}(),vc_initVideoBackgrounds(),function(){var vcSkrollrOptions,callSkrollInit=!1;window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("
    ").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),!(!callSkrollInit||!window.skrollr)&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),window.vc_googleMapsPointer,jQuery(document).ready(vc_prepareHoverBox),jQuery(window).resize(vc_prepareHoverBox),jQuery(document).ready(function($){window.vc_js()}); (function (global, factory){ typeof exports==='object'&&typeof module!=='undefined' ? module.exports=factory() : typeof define==='function'&&define.amd ? define(factory) : (global.Popper=factory()); }(this, (function (){ 'use strict'; var nativeHints=['native code', '[object MutationObserverConstructor]']; var isNative=(function (fn){ return nativeHints.some(function (hint){ return (fn||'').toString().indexOf(hint) > -1; }); }); var isBrowser=typeof window!=='undefined'; var longerTimeoutBrowsers=['Edge', 'Trident', 'Firefox']; var timeoutDuration=0; for (var i=0; i < longerTimeoutBrowsers.length; i +=1){ if(isBrowser&&navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >=0){ timeoutDuration=1; break; }} function microtaskDebounce(fn){ var scheduled=false; var i=0; var elem=document.createElement('span'); var observer=new MutationObserver(function (){ fn(); scheduled=false; }); observer.observe(elem, { attributes: true }); return function (){ if(!scheduled){ scheduled=true; elem.setAttribute('x-index', i); i=i + 1; }};} function taskDebounce(fn){ var scheduled=false; return function (){ if(!scheduled){ scheduled=true; setTimeout(function (){ scheduled=false; fn(); }, timeoutDuration); }};} var supportsNativeMutationObserver=isBrowser&&isNative(window.MutationObserver); var debounce=supportsNativeMutationObserver ? microtaskDebounce:taskDebounce; function isFunction(functionToCheck){ var getType={}; return functionToCheck&&getType.toString.call(functionToCheck)==='[object Function]'; } function getStyleComputedProperty(element, property){ if(element.nodeType!==1){ return []; } var css=window.getComputedStyle(element, null); return property ? css[property]:css; } function getParentNode(element){ if(element.nodeName==='HTML'){ return element; } return element.parentNode||element.host; } function getScrollParent(element){ if(!element||['HTML', 'BODY', '#document'].indexOf(element.nodeName)!==-1){ return window.document.body; } var _getStyleComputedProp=getStyleComputedProperty(element), overflow=_getStyleComputedProp.overflow, overflowX=_getStyleComputedProp.overflowX, overflowY=_getStyleComputedProp.overflowY; if(/(auto|scroll)/.test(overflow + overflowY + overflowX)){ return element; } return getScrollParent(getParentNode(element)); } function getOffsetParent(element){ var offsetParent=element&&element.offsetParent; var nodeName=offsetParent&&offsetParent.nodeName; if(!nodeName||nodeName==='BODY'||nodeName==='HTML'){ return window.document.documentElement; } if(['TD', 'TABLE'].indexOf(offsetParent.nodeName)!==-1&&getStyleComputedProperty(offsetParent, 'position')==='static'){ return getOffsetParent(offsetParent); } return offsetParent; } function isOffsetContainer(element){ var nodeName=element.nodeName; if(nodeName==='BODY'){ return false; } return nodeName==='HTML'||getOffsetParent(element.firstElementChild)===element; } function getRoot(node){ if(node.parentNode!==null){ return getRoot(node.parentNode); } return node; } function findCommonOffsetParent(element1, element2){ if(!element1||!element1.nodeType||!element2||!element2.nodeType){ return window.document.documentElement; } var order=element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; var start=order ? element1:element2; var end=order ? element2:element1; var range=document.createRange(); range.setStart(start, 0); range.setEnd(end, 0); var commonAncestorContainer=range.commonAncestorContainer; if(element1!==commonAncestorContainer&&element2!==commonAncestorContainer||start.contains(end)){ if(isOffsetContainer(commonAncestorContainer)){ return commonAncestorContainer; } return getOffsetParent(commonAncestorContainer); } var element1root=getRoot(element1); if(element1root.host){ return findCommonOffsetParent(element1root.host, element2); }else{ return findCommonOffsetParent(element1, getRoot(element2).host); }} function getScroll(element){ var side=arguments.length > 1&&arguments[1]!==undefined ? arguments[1]:'top'; var upperSide=side==='top' ? 'scrollTop':'scrollLeft'; var nodeName=element.nodeName; if(nodeName==='BODY'||nodeName==='HTML'){ var html=window.document.documentElement; var scrollingElement=window.document.scrollingElement||html; return scrollingElement[upperSide]; } return element[upperSide]; } function includeScroll(rect, element){ var subtract=arguments.length > 2&&arguments[2]!==undefined ? arguments[2]:false; var scrollTop=getScroll(element, 'top'); var scrollLeft=getScroll(element, 'left'); var modifier=subtract ? -1:1; rect.top +=scrollTop * modifier; rect.bottom +=scrollTop * modifier; rect.left +=scrollLeft * modifier; rect.right +=scrollLeft * modifier; return rect; } function getBordersSize(styles, axis){ var sideA=axis==='x' ? 'Left':'Top'; var sideB=sideA==='Left' ? 'Right':'Bottom'; return +styles['border' + sideA + 'Width'].split('px')[0] + +styles['border' + sideB + 'Width'].split('px')[0]; } var isIE10=undefined; var isIE10$1=function (){ if(isIE10===undefined){ isIE10=navigator.appVersion.indexOf('MSIE 10')!==-1; } return isIE10; }; function getSize(axis, body, html, computedStyle){ return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis==='Height' ? 'Top':'Left')] + computedStyle['margin' + (axis==='Height' ? 'Bottom':'Right')]:0); } function getWindowSizes(){ var body=window.document.body; var html=window.document.documentElement; var computedStyle=isIE10$1()&&window.getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), width: getSize('Width', body, html, computedStyle) };} var classCallCheck=function (instance, Constructor){ if(!(instance instanceof Constructor)){ throw new TypeError("Cannot call a class as a function"); }}; var createClass=function (){ function defineProperties(target, props){ for (var i=0; i < props.length; i++){ var descriptor=props[i]; descriptor.enumerable=descriptor.enumerable||false; descriptor.configurable=true; if("value" in descriptor) descriptor.writable=true; Object.defineProperty(target, descriptor.key, descriptor); }} return function (Constructor, protoProps, staticProps){ if(protoProps) defineProperties(Constructor.prototype, protoProps); if(staticProps) defineProperties(Constructor, staticProps); return Constructor; };}(); var defineProperty=function (obj, key, value){ if(key in obj){ Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); }else{ obj[key]=value; } return obj; }; var _extends=Object.assign||function (target){ for (var i=1; i < arguments.length; i++){ var source=arguments[i]; for (var key in source){ if(Object.prototype.hasOwnProperty.call(source, key)){ target[key]=source[key]; }} } return target; }; function getClientRect(offsets){ return _extends({}, offsets, { right: offsets.left + offsets.width, bottom: offsets.top + offsets.height }); } function getBoundingClientRect(element){ var rect={}; if(isIE10$1()){ try { rect=element.getBoundingClientRect(); var scrollTop=getScroll(element, 'top'); var scrollLeft=getScroll(element, 'left'); rect.top +=scrollTop; rect.left +=scrollLeft; rect.bottom +=scrollTop; rect.right +=scrollLeft; } catch (err){}}else{ rect=element.getBoundingClientRect(); } var result={ left: rect.left, top: rect.top, width: rect.right - rect.left, height: rect.bottom - rect.top }; var sizes=element.nodeName==='HTML' ? getWindowSizes():{}; var width=sizes.width||element.clientWidth||result.right - result.left; var height=sizes.height||element.clientHeight||result.bottom - result.top; var horizScrollbar=element.offsetWidth - width; var vertScrollbar=element.offsetHeight - height; if(horizScrollbar||vertScrollbar){ var styles=getStyleComputedProperty(element); horizScrollbar -=getBordersSize(styles, 'x'); vertScrollbar -=getBordersSize(styles, 'y'); result.width -=horizScrollbar; result.height -=vertScrollbar; } return getClientRect(result); } function getOffsetRectRelativeToArbitraryNode(children, parent){ var isIE10=isIE10$1(); var isHTML=parent.nodeName==='HTML'; var childrenRect=getBoundingClientRect(children); var parentRect=getBoundingClientRect(parent); var scrollParent=getScrollParent(children); var styles=getStyleComputedProperty(parent); var borderTopWidth=+styles.borderTopWidth.split('px')[0]; var borderLeftWidth=+styles.borderLeftWidth.split('px')[0]; var offsets=getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, width: childrenRect.width, height: childrenRect.height }); offsets.marginTop=0; offsets.marginLeft=0; if(!isIE10&&isHTML){ var marginTop=+styles.marginTop.split('px')[0]; var marginLeft=+styles.marginLeft.split('px')[0]; offsets.top -=borderTopWidth - marginTop; offsets.bottom -=borderTopWidth - marginTop; offsets.left -=borderLeftWidth - marginLeft; offsets.right -=borderLeftWidth - marginLeft; offsets.marginTop=marginTop; offsets.marginLeft=marginLeft; } if(isIE10 ? parent.contains(scrollParent):parent===scrollParent&&scrollParent.nodeName!=='BODY'){ offsets=includeScroll(offsets, parent); } return offsets; } function getViewportOffsetRectRelativeToArtbitraryNode(element){ var html=window.document.documentElement; var relativeOffset=getOffsetRectRelativeToArbitraryNode(element, html); var width=Math.max(html.clientWidth, window.innerWidth||0); var height=Math.max(html.clientHeight, window.innerHeight||0); var scrollTop=getScroll(html); var scrollLeft=getScroll(html, 'left'); var offset={ top: scrollTop - relativeOffset.top + relativeOffset.marginTop, left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, width: width, height: height }; return getClientRect(offset); } function isFixed(element){ var nodeName=element.nodeName; if(nodeName==='BODY'||nodeName==='HTML'){ return false; } if(getStyleComputedProperty(element, 'position')==='fixed'){ return true; } return isFixed(getParentNode(element)); } function getBoundaries(popper, reference, padding, boundariesElement){ var boundaries={ top: 0, left: 0 }; var offsetParent=findCommonOffsetParent(popper, reference); if(boundariesElement==='viewport'){ boundaries=getViewportOffsetRectRelativeToArtbitraryNode(offsetParent); }else{ var boundariesNode=void 0; if(boundariesElement==='scrollParent'){ boundariesNode=getScrollParent(getParentNode(popper)); if(boundariesNode.nodeName==='BODY'){ boundariesNode=window.document.documentElement; }}else if(boundariesElement==='window'){ boundariesNode=window.document.documentElement; }else{ boundariesNode=boundariesElement; } var offsets=getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent); if(boundariesNode.nodeName==='HTML'&&!isFixed(offsetParent)){ var _getWindowSizes=getWindowSizes(), height=_getWindowSizes.height, width=_getWindowSizes.width; boundaries.top +=offsets.top - offsets.marginTop; boundaries.bottom=height + offsets.top; boundaries.left +=offsets.left - offsets.marginLeft; boundaries.right=width + offsets.left; }else{ boundaries=offsets; }} boundaries.left +=padding; boundaries.top +=padding; boundaries.right -=padding; boundaries.bottom -=padding; return boundaries; } function getArea(_ref){ var width=_ref.width, height=_ref.height; return width * height; } function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement){ var padding=arguments.length > 5&&arguments[5]!==undefined ? arguments[5]:0; if(placement.indexOf('auto')===-1){ return placement; } var boundaries=getBoundaries(popper, reference, padding, boundariesElement); var rects={ top: { width: boundaries.width, height: refRect.top - boundaries.top }, right: { width: boundaries.right - refRect.right, height: boundaries.height }, bottom: { width: boundaries.width, height: boundaries.bottom - refRect.bottom }, left: { width: refRect.left - boundaries.left, height: boundaries.height }}; var sortedAreas=Object.keys(rects).map(function (key){ return _extends({ key: key }, rects[key], { area: getArea(rects[key]) }); }).sort(function (a, b){ return b.area - a.area; }); var filteredAreas=sortedAreas.filter(function (_ref2){ var width=_ref2.width, height=_ref2.height; return width >=popper.clientWidth&&height >=popper.clientHeight; }); var computedPlacement=filteredAreas.length > 0 ? filteredAreas[0].key:sortedAreas[0].key; var variation=placement.split('-')[1]; return computedPlacement + (variation ? '-' + variation:''); } function getReferenceOffsets(state, popper, reference){ var commonOffsetParent=findCommonOffsetParent(popper, reference); return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent); } function getOuterSizes(element){ var styles=window.getComputedStyle(element); var x=parseFloat(styles.marginTop) + parseFloat(styles.marginBottom); var y=parseFloat(styles.marginLeft) + parseFloat(styles.marginRight); var result={ width: element.offsetWidth + y, height: element.offsetHeight + x }; return result; } function getOppositePlacement(placement){ var hash={ left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; return placement.replace(/left|right|bottom|top/g, function (matched){ return hash[matched]; }); } function getPopperOffsets(popper, referenceOffsets, placement){ placement=placement.split('-')[0]; var popperRect=getOuterSizes(popper); var popperOffsets={ width: popperRect.width, height: popperRect.height }; var isHoriz=['right', 'left'].indexOf(placement)!==-1; var mainSide=isHoriz ? 'top':'left'; var secondarySide=isHoriz ? 'left':'top'; var measurement=isHoriz ? 'height':'width'; var secondaryMeasurement = !isHoriz ? 'height':'width'; popperOffsets[mainSide]=referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; if(placement===secondarySide){ popperOffsets[secondarySide]=referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; }else{ popperOffsets[secondarySide]=referenceOffsets[getOppositePlacement(secondarySide)]; } return popperOffsets; } function find(arr, check){ if(Array.prototype.find){ return arr.find(check); } return arr.filter(check)[0]; } function findIndex(arr, prop, value){ if(Array.prototype.findIndex){ return arr.findIndex(function (cur){ return cur[prop]===value; }); } var match=find(arr, function (obj){ return obj[prop]===value; }); return arr.indexOf(match); } function runModifiers(modifiers, data, ends){ var modifiersToRun=ends===undefined ? modifiers:modifiers.slice(0, findIndex(modifiers, 'name', ends)); modifiersToRun.forEach(function (modifier){ if(modifier.function){ console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); } var fn=modifier.function||modifier.fn; if(modifier.enabled&&isFunction(fn)){ data.offsets.popper=getClientRect(data.offsets.popper); data.offsets.reference=getClientRect(data.offsets.reference); data=fn(data, modifier); }}); return data; } function update(){ if(this.state.isDestroyed){ return; } var data={ instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {}}; data.offsets.reference=getReferenceOffsets(this.state, this.popper, this.reference); data.placement=computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); data.originalPlacement=data.placement; data.offsets.popper=getPopperOffsets(this.popper, data.offsets.reference, data.placement); data.offsets.popper.position='absolute'; data=runModifiers(this.modifiers, data); if(!this.state.isCreated){ this.state.isCreated=true; this.options.onCreate(data); }else{ this.options.onUpdate(data); }} function isModifierEnabled(modifiers, modifierName){ return modifiers.some(function (_ref){ var name=_ref.name, enabled=_ref.enabled; return enabled&&name===modifierName; }); } function getSupportedPropertyName(property){ var prefixes=[false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp=property.charAt(0).toUpperCase() + property.slice(1); for (var i=0; i < prefixes.length - 1; i++){ var prefix=prefixes[i]; var toCheck=prefix ? '' + prefix + upperProp:property; if(typeof window.document.body.style[toCheck]!=='undefined'){ return toCheck; }} return null; } function destroy(){ this.state.isDestroyed=true; if(isModifierEnabled(this.modifiers, 'applyStyle')){ this.popper.removeAttribute('x-placement'); this.popper.style.left=''; this.popper.style.position=''; this.popper.style.top=''; this.popper.style[getSupportedPropertyName('transform')]=''; } this.disableEventListeners(); if(this.options.removeOnDestroy){ this.popper.parentNode.removeChild(this.popper); } return this; } function attachToScrollParents(scrollParent, event, callback, scrollParents){ var isBody=scrollParent.nodeName==='BODY'; var target=isBody ? window:scrollParent; target.addEventListener(event, callback, { passive: true }); if(!isBody){ attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); } scrollParents.push(target); } function setupEventListeners(reference, options, state, updateBound){ state.updateBound=updateBound; window.addEventListener('resize', state.updateBound, { passive: true }); var scrollElement=getScrollParent(reference); attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); state.scrollElement=scrollElement; state.eventsEnabled=true; return state; } function enableEventListeners(){ if(!this.state.eventsEnabled){ this.state=setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); }} function removeEventListeners(reference, state){ window.removeEventListener('resize', state.updateBound); state.scrollParents.forEach(function (target){ target.removeEventListener('scroll', state.updateBound); }); state.updateBound=null; state.scrollParents=[]; state.scrollElement=null; state.eventsEnabled=false; return state; } function disableEventListeners(){ if(this.state.eventsEnabled){ window.cancelAnimationFrame(this.scheduleUpdate); this.state=removeEventListeners(this.reference, this.state); }} function isNumeric(n){ return n!==''&&!isNaN(parseFloat(n))&&isFinite(n); } function setStyles(element, styles){ Object.keys(styles).forEach(function (prop){ var unit=''; if(['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop)!==-1&&isNumeric(styles[prop])){ unit='px'; } element.style[prop]=styles[prop] + unit; }); } function setAttributes(element, attributes){ Object.keys(attributes).forEach(function (prop){ var value=attributes[prop]; if(value!==false){ element.setAttribute(prop, attributes[prop]); }else{ element.removeAttribute(prop); }}); } function applyStyle(data){ setStyles(data.instance.popper, data.styles); setAttributes(data.instance.popper, data.attributes); if(data.arrowElement&&Object.keys(data.arrowStyles).length){ setStyles(data.arrowElement, data.arrowStyles); } return data; } function applyStyleOnLoad(reference, popper, options, modifierOptions, state){ var referenceOffsets=getReferenceOffsets(state, popper, reference); var placement=computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); popper.setAttribute('x-placement', placement); setStyles(popper, { position: 'absolute' }); return options; } function computeStyle(data, options){ var x=options.x, y=options.y; var popper=data.offsets.popper; var legacyGpuAccelerationOption=find(data.instance.modifiers, function (modifier){ return modifier.name==='applyStyle'; }).gpuAcceleration; if(legacyGpuAccelerationOption!==undefined){ console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); } var gpuAcceleration=legacyGpuAccelerationOption!==undefined ? legacyGpuAccelerationOption:options.gpuAcceleration; var offsetParent=getOffsetParent(data.instance.popper); var offsetParentRect=getBoundingClientRect(offsetParent); var styles={ position: popper.position }; var offsets={ left: Math.floor(popper.left), top: Math.floor(popper.top), bottom: Math.floor(popper.bottom), right: Math.floor(popper.right) }; var sideA=x==='bottom' ? 'top':'bottom'; var sideB=y==='right' ? 'left':'right'; var prefixedProperty=getSupportedPropertyName('transform'); var left=void 0, top=void 0; if(sideA==='bottom'){ top=-offsetParentRect.height + offsets.bottom; }else{ top=offsets.top; } if(sideB==='right'){ left=-offsetParentRect.width + offsets.right; }else{ left=offsets.left; } if(gpuAcceleration&&prefixedProperty){ styles[prefixedProperty]='translate3d(' + left + 'px, ' + top + 'px, 0)'; styles[sideA]=0; styles[sideB]=0; styles.willChange='transform'; }else{ var invertTop=sideA==='bottom' ? -1:1; var invertLeft=sideB==='right' ? -1:1; styles[sideA]=top * invertTop; styles[sideB]=left * invertLeft; styles.willChange=sideA + ', ' + sideB; } var attributes={ 'x-placement': data.placement }; data.attributes=_extends({}, attributes, data.attributes); data.styles=_extends({}, styles, data.styles); data.arrowStyles=_extends({}, data.offsets.arrow, data.arrowStyles); return data; } function isModifierRequired(modifiers, requestingName, requestedName){ var requesting=find(modifiers, function (_ref){ var name=_ref.name; return name===requestingName; }); var isRequired = !!requesting&&modifiers.some(function (modifier){ return modifier.name===requestedName&&modifier.enabled&&modifier.order < requesting.order; }); if(!isRequired){ var _requesting='`' + requestingName + '`'; var requested='`' + requestedName + '`'; console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); } return isRequired; } function arrow(data, options){ if(!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')){ return data; } var arrowElement=options.element; if(typeof arrowElement==='string'){ arrowElement=data.instance.popper.querySelector(arrowElement); if(!arrowElement){ return data; }}else{ if(!data.instance.popper.contains(arrowElement)){ console.warn('WARNING: `arrow.element` must be child of its popper element!'); return data; }} var placement=data.placement.split('-')[0]; var _data$offsets=data.offsets, popper=_data$offsets.popper, reference=_data$offsets.reference; var isVertical=['left', 'right'].indexOf(placement)!==-1; var len=isVertical ? 'height':'width'; var sideCapitalized=isVertical ? 'Top':'Left'; var side=sideCapitalized.toLowerCase(); var altSide=isVertical ? 'left':'top'; var opSide=isVertical ? 'bottom':'right'; var arrowElementSize=getOuterSizes(arrowElement)[len]; if(reference[opSide] - arrowElementSize < popper[side]){ data.offsets.popper[side] -=popper[side] - (reference[opSide] - arrowElementSize); } if(reference[side] + arrowElementSize > popper[opSide]){ data.offsets.popper[side] +=reference[side] + arrowElementSize - popper[opSide]; } var center=reference[side] + reference[len] / 2 - arrowElementSize / 2; var popperMarginSide=getStyleComputedProperty(data.instance.popper, 'margin' + sideCapitalized).replace('px', ''); var sideValue=center - getClientRect(data.offsets.popper)[side] - popperMarginSide; sideValue=Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement=arrowElement; data.offsets.arrow={}; data.offsets.arrow[side]=Math.round(sideValue); data.offsets.arrow[altSide]=''; return data; } function getOppositeVariation(variation){ if(variation==='end'){ return 'start'; }else if(variation==='start'){ return 'end'; } return variation; } var placements=['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; var validPlacements=placements.slice(3); function clockwise(placement){ var counter=arguments.length > 1&&arguments[1]!==undefined ? arguments[1]:false; var index=validPlacements.indexOf(placement); var arr=validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); return counter ? arr.reverse():arr; } var BEHAVIORS={ FLIP: 'flip', CLOCKWISE: 'clockwise', COUNTERCLOCKWISE: 'counterclockwise' }; function flip(data, options){ if(isModifierEnabled(data.instance.modifiers, 'inner')){ return data; } if(data.flipped&&data.placement===data.originalPlacement){ return data; } var boundaries=getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement); var placement=data.placement.split('-')[0]; var placementOpposite=getOppositePlacement(placement); var variation=data.placement.split('-')[1]||''; var flipOrder=[]; switch (options.behavior){ case BEHAVIORS.FLIP: flipOrder=[placement, placementOpposite]; break; case BEHAVIORS.CLOCKWISE: flipOrder=clockwise(placement); break; case BEHAVIORS.COUNTERCLOCKWISE: flipOrder=clockwise(placement, true); break; default: flipOrder=options.behavior; } flipOrder.forEach(function (step, index){ if(placement!==step||flipOrder.length===index + 1){ return data; } placement=data.placement.split('-')[0]; placementOpposite=getOppositePlacement(placement); var popperOffsets=data.offsets.popper; var refOffsets=data.offsets.reference; var floor=Math.floor; var overlapsRef=placement==='left'&&floor(popperOffsets.right) > floor(refOffsets.left)||placement==='right'&&floor(popperOffsets.left) < floor(refOffsets.right)||placement==='top'&&floor(popperOffsets.bottom) > floor(refOffsets.top)||placement==='bottom'&&floor(popperOffsets.top) < floor(refOffsets.bottom); var overflowsLeft=floor(popperOffsets.left) < floor(boundaries.left); var overflowsRight=floor(popperOffsets.right) > floor(boundaries.right); var overflowsTop=floor(popperOffsets.top) < floor(boundaries.top); var overflowsBottom=floor(popperOffsets.bottom) > floor(boundaries.bottom); var overflowsBoundaries=placement==='left'&&overflowsLeft||placement==='right'&&overflowsRight||placement==='top'&&overflowsTop||placement==='bottom'&&overflowsBottom; var isVertical=['top', 'bottom'].indexOf(placement)!==-1; var flippedVariation = !!options.flipVariations&&(isVertical&&variation==='start'&&overflowsLeft||isVertical&&variation==='end'&&overflowsRight||!isVertical&&variation==='start'&&overflowsTop||!isVertical&&variation==='end'&&overflowsBottom); if(overlapsRef||overflowsBoundaries||flippedVariation){ data.flipped=true; if(overlapsRef||overflowsBoundaries){ placement=flipOrder[index + 1]; } if(flippedVariation){ variation=getOppositeVariation(variation); } data.placement=placement + (variation ? '-' + variation:''); data.offsets.popper=_extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); data=runModifiers(data.instance.modifiers, data, 'flip'); }}); return data; } function keepTogether(data){ var _data$offsets=data.offsets, popper=_data$offsets.popper, reference=_data$offsets.reference; var placement=data.placement.split('-')[0]; var floor=Math.floor; var isVertical=['top', 'bottom'].indexOf(placement)!==-1; var side=isVertical ? 'right':'bottom'; var opSide=isVertical ? 'left':'top'; var measurement=isVertical ? 'width':'height'; if(popper[side] < floor(reference[opSide])){ data.offsets.popper[opSide]=floor(reference[opSide]) - popper[measurement]; } if(popper[opSide] > floor(reference[side])){ data.offsets.popper[opSide]=floor(reference[side]); } return data; } function toValue(str, measurement, popperOffsets, referenceOffsets){ var split=str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); var value=+split[1]; var unit=split[2]; if(!value){ return str; } if(unit.indexOf('%')===0){ var element=void 0; switch (unit){ case '%p': element=popperOffsets; break; case '%': case '%r': default: element=referenceOffsets; } var rect=getClientRect(element); return rect[measurement] / 100 * value; }else if(unit==='vh'||unit==='vw'){ var size=void 0; if(unit==='vh'){ size=Math.max(document.documentElement.clientHeight, window.innerHeight||0); }else{ size=Math.max(document.documentElement.clientWidth, window.innerWidth||0); } return size / 100 * value; }else{ return value; }} function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement){ var offsets=[0, 0]; var useHeight=['right', 'left'].indexOf(basePlacement)!==-1; var fragments=offset.split(/(\+|\-)/).map(function (frag){ return frag.trim(); }); var divider=fragments.indexOf(find(fragments, function (frag){ return frag.search(/,|\s/)!==-1; })); if(fragments[divider]&&fragments[divider].indexOf(',')===-1){ console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); } var splitRegex=/\s*,\s*|\s+/; var ops=divider!==-1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))]:[fragments]; ops=ops.map(function (op, index){ var measurement=(index===1 ? !useHeight:useHeight) ? 'height':'width'; var mergeWithPrevious=false; return op .reduce(function (a, b){ if(a[a.length - 1]===''&&['+', '-'].indexOf(b)!==-1){ a[a.length - 1]=b; mergeWithPrevious=true; return a; }else if(mergeWithPrevious){ a[a.length - 1] +=b; mergeWithPrevious=false; return a; }else{ return a.concat(b); }}, []) .map(function (str){ return toValue(str, measurement, popperOffsets, referenceOffsets); }); }); ops.forEach(function (op, index){ op.forEach(function (frag, index2){ if(isNumeric(frag)){ offsets[index] +=frag * (op[index2 - 1]==='-' ? -1:1); }}); }); return offsets; } function offset(data, _ref){ var offset=_ref.offset; var placement=data.placement, _data$offsets=data.offsets, popper=_data$offsets.popper, reference=_data$offsets.reference; var basePlacement=placement.split('-')[0]; var offsets=void 0; if(isNumeric(+offset)){ offsets=[+offset, 0]; }else{ offsets=parseOffset(offset, popper, reference, basePlacement); } if(basePlacement==='left'){ popper.top +=offsets[0]; popper.left -=offsets[1]; }else if(basePlacement==='right'){ popper.top +=offsets[0]; popper.left +=offsets[1]; }else if(basePlacement==='top'){ popper.left +=offsets[0]; popper.top -=offsets[1]; }else if(basePlacement==='bottom'){ popper.left +=offsets[0]; popper.top +=offsets[1]; } data.popper=popper; return data; } function preventOverflow(data, options){ var boundariesElement=options.boundariesElement||getOffsetParent(data.instance.popper); if(data.instance.reference===boundariesElement){ boundariesElement=getOffsetParent(boundariesElement); } var boundaries=getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement); options.boundaries=boundaries; var order=options.priority; var popper=data.offsets.popper; var check={ primary: function primary(placement){ var value=popper[placement]; if(popper[placement] < boundaries[placement]&&!options.escapeWithReference){ value=Math.max(popper[placement], boundaries[placement]); } return defineProperty({}, placement, value); }, secondary: function secondary(placement){ var mainSide=placement==='right' ? 'left':'top'; var value=popper[mainSide]; if(popper[placement] > boundaries[placement]&&!options.escapeWithReference){ value=Math.min(popper[mainSide], boundaries[placement] - (placement==='right' ? popper.width:popper.height)); } return defineProperty({}, mainSide, value); }}; order.forEach(function (placement){ var side=['left', 'top'].indexOf(placement)!==-1 ? 'primary':'secondary'; popper=_extends({}, popper, check[side](placement)); }); data.offsets.popper=popper; return data; } function shift(data){ var placement=data.placement; var basePlacement=placement.split('-')[0]; var shiftvariation=placement.split('-')[1]; if(shiftvariation){ var _data$offsets=data.offsets, reference=_data$offsets.reference, popper=_data$offsets.popper; var isVertical=['bottom', 'top'].indexOf(basePlacement)!==-1; var side=isVertical ? 'left':'top'; var measurement=isVertical ? 'width':'height'; var shiftOffsets={ start: defineProperty({}, side, reference[side]), end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) }; data.offsets.popper=_extends({}, popper, shiftOffsets[shiftvariation]); } return data; } function hide(data){ if(!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')){ return data; } var refRect=data.offsets.reference; var bound=find(data.instance.modifiers, function (modifier){ return modifier.name==='preventOverflow'; }).boundaries; if(refRect.bottom < bound.top||refRect.left > bound.right||refRect.top > bound.bottom||refRect.right < bound.left){ if(data.hide===true){ return data; } data.hide=true; data.attributes['x-out-of-boundaries']=''; }else{ if(data.hide===false){ return data; } data.hide=false; data.attributes['x-out-of-boundaries']=false; } return data; } function inner(data){ var placement=data.placement; var basePlacement=placement.split('-')[0]; var _data$offsets=data.offsets, popper=_data$offsets.popper, reference=_data$offsets.reference; var isHoriz=['left', 'right'].indexOf(basePlacement)!==-1; var subtractLength=['top', 'left'].indexOf(basePlacement)===-1; popper[isHoriz ? 'left':'top']=reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width':'height']:0); data.placement=getOppositePlacement(placement); data.offsets.popper=getClientRect(popper); return data; } var modifiers={ shift: { order: 100, enabled: true, fn: shift }, offset: { order: 200, enabled: true, fn: offset, offset: 0 }, preventOverflow: { order: 300, enabled: true, fn: preventOverflow, priority: ['left', 'right', 'top', 'bottom'], padding: 5, boundariesElement: 'scrollParent' }, keepTogether: { order: 400, enabled: true, fn: keepTogether }, arrow: { order: 500, enabled: true, fn: arrow, element: '[x-arrow]' }, flip: { order: 600, enabled: true, fn: flip, behavior: 'flip', padding: 5, boundariesElement: 'viewport' }, inner: { order: 700, enabled: false, fn: inner }, hide: { order: 800, enabled: true, fn: hide }, computeStyle: { order: 850, enabled: true, fn: computeStyle, gpuAcceleration: true, x: 'bottom', y: 'right' }, applyStyle: { order: 900, enabled: true, fn: applyStyle, onLoad: applyStyleOnLoad, gpuAcceleration: undefined }}; var Defaults={ placement: 'bottom', eventsEnabled: true, removeOnDestroy: false, onCreate: function onCreate(){}, onUpdate: function onUpdate(){}, modifiers: modifiers }; var Popper=function (){ function Popper(reference, popper){ var _this=this; var options=arguments.length > 2&&arguments[2]!==undefined ? arguments[2]:{}; classCallCheck(this, Popper); this.scheduleUpdate=function (){ return requestAnimationFrame(_this.update); }; this.update=debounce(this.update.bind(this)); this.options=_extends({}, Popper.Defaults, options); this.state={ isDestroyed: false, isCreated: false, scrollParents: [] }; this.reference=reference.jquery ? reference[0]:reference; this.popper=popper.jquery ? popper[0]:popper; this.options.modifiers={}; Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name){ _this.options.modifiers[name]=_extends({}, Popper.Defaults.modifiers[name]||{}, options.modifiers ? options.modifiers[name]:{}); }); this.modifiers=Object.keys(this.options.modifiers).map(function (name){ return _extends({ name: name }, _this.options.modifiers[name]); }) .sort(function (a, b){ return a.order - b.order; }); this.modifiers.forEach(function (modifierOptions){ if(modifierOptions.enabled&&isFunction(modifierOptions.onLoad)){ modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); }}); this.update(); var eventsEnabled=this.options.eventsEnabled; if(eventsEnabled){ this.enableEventListeners(); } this.state.eventsEnabled=eventsEnabled; } createClass(Popper, [{ key: 'update', value: function update$$1(){ return update.call(this); }}, { key: 'destroy', value: function destroy$$1(){ return destroy.call(this); }}, { key: 'enableEventListeners', value: function enableEventListeners$$1(){ return enableEventListeners.call(this); }}, { key: 'disableEventListeners', value: function disableEventListeners$$1(){ return disableEventListeners.call(this); } }]); return Popper; }(); Popper.Utils=(typeof window!=='undefined' ? window:global).PopperUtils; Popper.placements=placements; Popper.Defaults=Defaults; return Popper; }))); (function (global, factory){ typeof exports==='object'&&typeof module!=='undefined' ? factory(exports, require('jquery'), require('popper.js')) : typeof define==='function'&&define.amd ? define(['exports', 'jquery', 'popper.js'], factory) : (factory((global.bootstrap={}),global.jQuery,global.Popper)); }(this, (function (exports,$,Popper){ 'use strict'; $=$&&$.hasOwnProperty('default') ? $['default']:$; Popper=Popper&&Popper.hasOwnProperty('default') ? Popper['default']:Popper; function _defineProperties(target, props){ for (var i=0; i < props.length; i++){ var descriptor=props[i]; descriptor.enumerable=descriptor.enumerable||false; descriptor.configurable=true; if("value" in descriptor) descriptor.writable=true; Object.defineProperty(target, descriptor.key, descriptor); }} function _createClass(Constructor, protoProps, staticProps){ if(protoProps) _defineProperties(Constructor.prototype, protoProps); if(staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _defineProperty(obj, key, value){ if(key in obj){ Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); }else{ obj[key]=value; } return obj; } function _objectSpread(target){ for (var i=1; i < arguments.length; i++){ var source=arguments[i]!=null ? arguments[i]:{}; var ownKeys=Object.keys(source); if(typeof Object.getOwnPropertySymbols==='function'){ ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym){ return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key){ _defineProperty(target, key, source[key]); }); } return target; } function _inheritsLoose(subClass, superClass){ subClass.prototype=Object.create(superClass.prototype); subClass.prototype.constructor=subClass; subClass.__proto__=superClass; } var Util=function ($$$1){ var TRANSITION_END='transitionend'; var MAX_UID=1000000; var MILLISECONDS_MULTIPLIER=1000; function toType(obj){ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); } function getSpecialTransitionEndEvent(){ return { bindType: TRANSITION_END, delegateType: TRANSITION_END, handle: function handle(event){ if($$$1(event.target).is(this)){ return event.handleObj.handler.apply(this, arguments); } return undefined; }};} function transitionEndEmulator(duration){ var _this=this; var called=false; $$$1(this).one(Util.TRANSITION_END, function (){ called=true; }); setTimeout(function (){ if(!called){ Util.triggerTransitionEnd(_this); }}, duration); return this; } function setTransitionEndSupport(){ $$$1.fn.emulateTransitionEnd=transitionEndEmulator; $$$1.event.special[Util.TRANSITION_END]=getSpecialTransitionEndEvent(); } var Util={ TRANSITION_END: 'bsTransitionEnd', getUID: function getUID(prefix){ do { prefix +=~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here } while (document.getElementById(prefix)); return prefix; }, getSelectorFromElement: function getSelectorFromElement(element){ var selector=element.getAttribute('data-target'); if(!selector||selector==='#'){ selector=element.getAttribute('href')||''; } try { return document.querySelector(selector) ? selector:null; } catch (err){ return null; }}, getTransitionDurationFromElement: function getTransitionDurationFromElement(element){ if(!element){ return 0; } var transitionDuration=$$$1(element).css('transition-duration'); var floatTransitionDuration=parseFloat(transitionDuration); if(!floatTransitionDuration){ return 0; } transitionDuration=transitionDuration.split(',')[0]; return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER; }, reflow: function reflow(element){ return element.offsetHeight; }, triggerTransitionEnd: function triggerTransitionEnd(element){ $$$1(element).trigger(TRANSITION_END); }, supportsTransitionEnd: function supportsTransitionEnd(){ return Boolean(TRANSITION_END); }, isElement: function isElement(obj){ return (obj[0]||obj).nodeType; }, typeCheckConfig: function typeCheckConfig(componentName, config, configTypes){ for (var property in configTypes){ if(Object.prototype.hasOwnProperty.call(configTypes, property)){ var expectedTypes=configTypes[property]; var value=config[property]; var valueType=value&&Util.isElement(value) ? 'element':toType(value); if(!new RegExp(expectedTypes).test(valueType)){ throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); }} }} }; setTransitionEndSupport(); return Util; }($); var Alert=function ($$$1){ var NAME='alert'; var VERSION='4.1.3'; var DATA_KEY='bs.alert'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var Selector={ DISMISS: '[data-dismiss="alert"]' }; var Event={ CLOSE: "close" + EVENT_KEY, CLOSED: "closed" + EVENT_KEY, CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY }; var ClassName={ ALERT: 'alert', FADE: 'fade', SHOW: 'show' }; var Alert = function (){ function Alert(element){ this._element=element; } var _proto=Alert.prototype; _proto.close=function close(element){ var rootElement=this._element; if(element){ rootElement=this._getRootElement(element); } var customEvent=this._triggerCloseEvent(rootElement); if(customEvent.isDefaultPrevented()){ return; } this._removeElement(rootElement); }; _proto.dispose=function dispose(){ $$$1.removeData(this._element, DATA_KEY); this._element=null; }; _proto._getRootElement=function _getRootElement(element){ var selector=Util.getSelectorFromElement(element); var parent=false; if(selector){ parent=document.querySelector(selector); } if(!parent){ parent=$$$1(element).closest("." + ClassName.ALERT)[0]; } return parent; }; _proto._triggerCloseEvent=function _triggerCloseEvent(element){ var closeEvent=$$$1.Event(Event.CLOSE); $$$1(element).trigger(closeEvent); return closeEvent; }; _proto._removeElement=function _removeElement(element){ var _this=this; $$$1(element).removeClass(ClassName.SHOW); if(!$$$1(element).hasClass(ClassName.FADE)){ this._destroyElement(element); return; } var transitionDuration=Util.getTransitionDurationFromElement(element); $$$1(element).one(Util.TRANSITION_END, function (event){ return _this._destroyElement(element, event); }).emulateTransitionEnd(transitionDuration); }; _proto._destroyElement=function _destroyElement(element){ $$$1(element).detach().trigger(Event.CLOSED).remove(); }; Alert._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var $element=$$$1(this); var data=$element.data(DATA_KEY); if(!data){ data=new Alert(this); $element.data(DATA_KEY, data); } if(config==='close'){ data[config](this); }}); }; Alert._handleDismiss=function _handleDismiss(alertInstance){ return function (event){ if(event){ event.preventDefault(); } alertInstance.close(this); };}; _createClass(Alert, null, [{ key: "VERSION", get: function get(){ return VERSION; }}]); return Alert; }(); $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); $$$1.fn[NAME]=Alert._jQueryInterface; $$$1.fn[NAME].Constructor=Alert; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Alert._jQueryInterface; }; return Alert; }($); var Button=function ($$$1){ var NAME='button'; var VERSION='4.1.3'; var DATA_KEY='bs.button'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var ClassName={ ACTIVE: 'active', BUTTON: 'btn', FOCUS: 'focus' }; var Selector={ DATA_TOGGLE_CARROT: '[data-toggle^="button"]', DATA_TOGGLE: '[data-toggle="buttons"]', INPUT: 'input', ACTIVE: '.active', BUTTON: '.btn' }; var Event={ CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY) }; var Button = function (){ function Button(element){ this._element=element; } var _proto=Button.prototype; _proto.toggle=function toggle(){ var triggerChangeEvent=true; var addAriaPressed=true; var rootElement=$$$1(this._element).closest(Selector.DATA_TOGGLE)[0]; if(rootElement){ var input=this._element.querySelector(Selector.INPUT); if(input){ if(input.type==='radio'){ if(input.checked&&this._element.classList.contains(ClassName.ACTIVE)){ triggerChangeEvent=false; }else{ var activeElement=rootElement.querySelector(Selector.ACTIVE); if(activeElement){ $$$1(activeElement).removeClass(ClassName.ACTIVE); }} } if(triggerChangeEvent){ if(input.hasAttribute('disabled')||rootElement.hasAttribute('disabled')||input.classList.contains('disabled')||rootElement.classList.contains('disabled')){ return; } input.checked = !this._element.classList.contains(ClassName.ACTIVE); $$$1(input).trigger('change'); } input.focus(); addAriaPressed=false; }} if(addAriaPressed){ this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE)); } if(triggerChangeEvent){ $$$1(this._element).toggleClass(ClassName.ACTIVE); }}; _proto.dispose=function dispose(){ $$$1.removeData(this._element, DATA_KEY); this._element=null; }; Button._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var data=$$$1(this).data(DATA_KEY); if(!data){ data=new Button(this); $$$1(this).data(DATA_KEY, data); } if(config==='toggle'){ data[config](); }}); }; _createClass(Button, null, [{ key: "VERSION", get: function get(){ return VERSION; }}]); return Button; }(); $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event){ event.preventDefault(); var button=event.target; if(!$$$1(button).hasClass(ClassName.BUTTON)){ button=$$$1(button).closest(Selector.BUTTON); } Button._jQueryInterface.call($$$1(button), 'toggle'); }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event){ var button=$$$1(event.target).closest(Selector.BUTTON)[0]; $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); }); $$$1.fn[NAME]=Button._jQueryInterface; $$$1.fn[NAME].Constructor=Button; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Button._jQueryInterface; }; return Button; }($); var Carousel=function ($$$1){ var NAME='carousel'; var VERSION='4.1.3'; var DATA_KEY='bs.carousel'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var ARROW_LEFT_KEYCODE=37; var ARROW_RIGHT_KEYCODE=39; var TOUCHEVENT_COMPAT_WAIT=500; var Default={ interval: 5000, keyboard: true, slide: false, pause: 'hover', wrap: true }; var DefaultType={ interval: '(number|boolean)', keyboard: 'boolean', slide: '(boolean|string)', pause: '(string|boolean)', wrap: 'boolean' }; var Direction={ NEXT: 'next', PREV: 'prev', LEFT: 'left', RIGHT: 'right' }; var Event={ SLIDE: "slide" + EVENT_KEY, SLID: "slid" + EVENT_KEY, KEYDOWN: "keydown" + EVENT_KEY, MOUSEENTER: "mouseenter" + EVENT_KEY, MOUSELEAVE: "mouseleave" + EVENT_KEY, TOUCHEND: "touchend" + EVENT_KEY, LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY, CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY }; var ClassName={ CAROUSEL: 'carousel', ACTIVE: 'active', SLIDE: 'slide', RIGHT: 'carousel-item-right', LEFT: 'carousel-item-left', NEXT: 'carousel-item-next', PREV: 'carousel-item-prev', ITEM: 'carousel-item' }; var Selector={ ACTIVE: '.active', ACTIVE_ITEM: '.active.carousel-item', ITEM: '.carousel-item', NEXT_PREV: '.carousel-item-next, .carousel-item-prev', INDICATORS: '.carousel-indicators', DATA_SLIDE: '[data-slide], [data-slide-to]', DATA_RIDE: '[data-ride="carousel"]' }; var Carousel = function (){ function Carousel(element, config){ this._items=null; this._interval=null; this._activeElement=null; this._isPaused=false; this._isSliding=false; this.touchTimeout=null; this._config=this._getConfig(config); this._element=$$$1(element)[0]; this._indicatorsElement=this._element.querySelector(Selector.INDICATORS); this._addEventListeners(); } var _proto=Carousel.prototype; _proto.next=function next(){ if(!this._isSliding){ this._slide(Direction.NEXT); }}; _proto.nextWhenVisible=function nextWhenVisible(){ if(!document.hidden&&$$$1(this._element).is(':visible')&&$$$1(this._element).css('visibility')!=='hidden'){ this.next(); }}; _proto.prev=function prev(){ if(!this._isSliding){ this._slide(Direction.PREV); }}; _proto.pause=function pause(event){ if(!event){ this._isPaused=true; } if(this._element.querySelector(Selector.NEXT_PREV)){ Util.triggerTransitionEnd(this._element); this.cycle(true); } clearInterval(this._interval); this._interval=null; }; _proto.cycle=function cycle(event){ if(!event){ this._isPaused=false; } if(this._interval){ clearInterval(this._interval); this._interval=null; } if(this._config.interval&&!this._isPaused){ this._interval=setInterval((document.visibilityState ? this.nextWhenVisible:this.next).bind(this), this._config.interval); }}; _proto.to=function to(index){ var _this=this; this._activeElement=this._element.querySelector(Selector.ACTIVE_ITEM); var activeIndex=this._getItemIndex(this._activeElement); if(index > this._items.length - 1||index < 0){ return; } if(this._isSliding){ $$$1(this._element).one(Event.SLID, function (){ return _this.to(index); }); return; } if(activeIndex===index){ this.pause(); this.cycle(); return; } var direction=index > activeIndex ? Direction.NEXT:Direction.PREV; this._slide(direction, this._items[index]); }; _proto.dispose=function dispose(){ $$$1(this._element).off(EVENT_KEY); $$$1.removeData(this._element, DATA_KEY); this._items=null; this._config=null; this._element=null; this._interval=null; this._isPaused=null; this._isSliding=null; this._activeElement=null; this._indicatorsElement=null; }; _proto._getConfig=function _getConfig(config){ config=_objectSpread({}, Default, config); Util.typeCheckConfig(NAME, config, DefaultType); return config; }; _proto._addEventListeners=function _addEventListeners(){ var _this2=this; if(this._config.keyboard){ $$$1(this._element).on(Event.KEYDOWN, function (event){ return _this2._keydown(event); }); } if(this._config.pause==='hover'){ $$$1(this._element).on(Event.MOUSEENTER, function (event){ return _this2.pause(event); }).on(Event.MOUSELEAVE, function (event){ return _this2.cycle(event); }); if('ontouchstart' in document.documentElement){ $$$1(this._element).on(Event.TOUCHEND, function (){ _this2.pause(); if(_this2.touchTimeout){ clearTimeout(_this2.touchTimeout); } _this2.touchTimeout=setTimeout(function (event){ return _this2.cycle(event); }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval); }); }} }; _proto._keydown=function _keydown(event){ if(/input|textarea/i.test(event.target.tagName)){ return; } switch (event.which){ case ARROW_LEFT_KEYCODE: event.preventDefault(); this.prev(); break; case ARROW_RIGHT_KEYCODE: event.preventDefault(); this.next(); break; default: }}; _proto._getItemIndex=function _getItemIndex(element){ this._items=element&&element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)):[]; return this._items.indexOf(element); }; _proto._getItemByDirection=function _getItemByDirection(direction, activeElement){ var isNextDirection=direction===Direction.NEXT; var isPrevDirection=direction===Direction.PREV; var activeIndex=this._getItemIndex(activeElement); var lastItemIndex=this._items.length - 1; var isGoingToWrap=isPrevDirection&&activeIndex===0||isNextDirection&&activeIndex===lastItemIndex; if(isGoingToWrap&&!this._config.wrap){ return activeElement; } var delta=direction===Direction.PREV ? -1:1; var itemIndex=(activeIndex + delta) % this._items.length; return itemIndex===-1 ? this._items[this._items.length - 1]:this._items[itemIndex]; }; _proto._triggerSlideEvent=function _triggerSlideEvent(relatedTarget, eventDirectionName){ var targetIndex=this._getItemIndex(relatedTarget); var fromIndex=this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM)); var slideEvent=$$$1.Event(Event.SLIDE, { relatedTarget: relatedTarget, direction: eventDirectionName, from: fromIndex, to: targetIndex }); $$$1(this._element).trigger(slideEvent); return slideEvent; }; _proto._setActiveIndicatorElement=function _setActiveIndicatorElement(element){ if(this._indicatorsElement){ var indicators=[].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE)); $$$1(indicators).removeClass(ClassName.ACTIVE); var nextIndicator=this._indicatorsElement.children[this._getItemIndex(element)]; if(nextIndicator){ $$$1(nextIndicator).addClass(ClassName.ACTIVE); }} }; _proto._slide=function _slide(direction, element){ var _this3=this; var activeElement=this._element.querySelector(Selector.ACTIVE_ITEM); var activeElementIndex=this._getItemIndex(activeElement); var nextElement=element||activeElement&&this._getItemByDirection(direction, activeElement); var nextElementIndex=this._getItemIndex(nextElement); var isCycling=Boolean(this._interval); var directionalClassName; var orderClassName; var eventDirectionName; if(direction===Direction.NEXT){ directionalClassName=ClassName.LEFT; orderClassName=ClassName.NEXT; eventDirectionName=Direction.LEFT; }else{ directionalClassName=ClassName.RIGHT; orderClassName=ClassName.PREV; eventDirectionName=Direction.RIGHT; } if(nextElement&&$$$1(nextElement).hasClass(ClassName.ACTIVE)){ this._isSliding=false; return; } var slideEvent=this._triggerSlideEvent(nextElement, eventDirectionName); if(slideEvent.isDefaultPrevented()){ return; } if(!activeElement||!nextElement){ return; } this._isSliding=true; if(isCycling){ this.pause(); } this._setActiveIndicatorElement(nextElement); var slidEvent=$$$1.Event(Event.SLID, { relatedTarget: nextElement, direction: eventDirectionName, from: activeElementIndex, to: nextElementIndex }); if($$$1(this._element).hasClass(ClassName.SLIDE)){ $$$1(nextElement).addClass(orderClassName); Util.reflow(nextElement); $$$1(activeElement).addClass(directionalClassName); $$$1(nextElement).addClass(directionalClassName); var transitionDuration=Util.getTransitionDurationFromElement(activeElement); $$$1(activeElement).one(Util.TRANSITION_END, function (){ $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); _this3._isSliding=false; setTimeout(function (){ return $$$1(_this3._element).trigger(slidEvent); }, 0); }).emulateTransitionEnd(transitionDuration); }else{ $$$1(activeElement).removeClass(ClassName.ACTIVE); $$$1(nextElement).addClass(ClassName.ACTIVE); this._isSliding=false; $$$1(this._element).trigger(slidEvent); } if(isCycling){ this.cycle(); }}; Carousel._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var data=$$$1(this).data(DATA_KEY); var _config=_objectSpread({}, Default, $$$1(this).data()); if(typeof config==='object'){ _config=_objectSpread({}, _config, config); } var action=typeof config==='string' ? config:_config.slide; if(!data){ data=new Carousel(this, _config); $$$1(this).data(DATA_KEY, data); } if(typeof config==='number'){ data.to(config); }else if(typeof action==='string'){ if(typeof data[action]==='undefined'){ throw new TypeError("No method named \"" + action + "\""); } data[action](); }else if(_config.interval){ data.pause(); data.cycle(); }}); }; Carousel._dataApiClickHandler=function _dataApiClickHandler(event){ var selector=Util.getSelectorFromElement(this); if(!selector){ return; } var target=$$$1(selector)[0]; if(!target||!$$$1(target).hasClass(ClassName.CAROUSEL)){ return; } var config=_objectSpread({}, $$$1(target).data(), $$$1(this).data()); var slideIndex=this.getAttribute('data-slide-to'); if(slideIndex){ config.interval=false; } Carousel._jQueryInterface.call($$$1(target), config); if(slideIndex){ $$$1(target).data(DATA_KEY).to(slideIndex); } event.preventDefault(); }; _createClass(Carousel, null, [{ key: "VERSION", get: function get(){ return VERSION; }}, { key: "Default", get: function get(){ return Default; }}]); return Carousel; }(); $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); $$$1(window).on(Event.LOAD_DATA_API, function (){ var carousels=[].slice.call(document.querySelectorAll(Selector.DATA_RIDE)); for (var i=0, len=carousels.length; i < len; i++){ var $carousel=$$$1(carousels[i]); Carousel._jQueryInterface.call($carousel, $carousel.data()); }}); $$$1.fn[NAME]=Carousel._jQueryInterface; $$$1.fn[NAME].Constructor=Carousel; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Carousel._jQueryInterface; }; return Carousel; }($); var Collapse=function ($$$1){ var NAME='collapse'; var VERSION='4.1.3'; var DATA_KEY='bs.collapse'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var Default={ toggle: true, parent: '' }; var DefaultType={ toggle: 'boolean', parent: '(string|element)' }; var Event={ SHOW: "show" + EVENT_KEY, SHOWN: "shown" + EVENT_KEY, HIDE: "hide" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY, CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY }; var ClassName={ SHOW: 'show', COLLAPSE: 'collapse', COLLAPSING: 'collapsing', COLLAPSED: 'collapsed' }; var Dimension={ WIDTH: 'width', HEIGHT: 'height' }; var Selector={ ACTIVES: '.show, .collapsing', DATA_TOGGLE: '[data-toggle="collapse"]' }; var Collapse = function (){ function Collapse(element, config){ this._isTransitioning=false; this._element=element; this._config=this._getConfig(config); this._triggerArray=$$$1.makeArray(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); var toggleList=[].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)); for (var i=0, len=toggleList.length; i < len; i++){ var elem=toggleList[i]; var selector=Util.getSelectorFromElement(elem); var filterElement=[].slice.call(document.querySelectorAll(selector)).filter(function (foundElem){ return foundElem===element; }); if(selector!==null&&filterElement.length > 0){ this._selector=selector; this._triggerArray.push(elem); }} this._parent=this._config.parent ? this._getParent():null; if(!this._config.parent){ this._addAriaAndCollapsedClass(this._element, this._triggerArray); } if(this._config.toggle){ this.toggle(); }} var _proto=Collapse.prototype; _proto.toggle=function toggle(){ if($$$1(this._element).hasClass(ClassName.SHOW)){ this.hide(); }else{ this.show(); }}; _proto.show=function show(){ var _this=this; if(this._isTransitioning||$$$1(this._element).hasClass(ClassName.SHOW)){ return; } var actives; var activesData; if(this._parent){ actives=[].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function (elem){ return elem.getAttribute('data-parent')===_this._config.parent; }); if(actives.length===0){ actives=null; }} if(actives){ activesData=$$$1(actives).not(this._selector).data(DATA_KEY); if(activesData&&activesData._isTransitioning){ return; }} var startEvent=$$$1.Event(Event.SHOW); $$$1(this._element).trigger(startEvent); if(startEvent.isDefaultPrevented()){ return; } if(actives){ Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide'); if(!activesData){ $$$1(actives).data(DATA_KEY, null); }} var dimension=this._getDimension(); $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); this._element.style[dimension]=0; if(this._triggerArray.length){ $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); } this.setTransitioning(true); var complete=function complete(){ $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); _this._element.style[dimension]=''; _this.setTransitioning(false); $$$1(_this._element).trigger(Event.SHOWN); }; var capitalizedDimension=dimension[0].toUpperCase() + dimension.slice(1); var scrollSize="scroll" + capitalizedDimension; var transitionDuration=Util.getTransitionDurationFromElement(this._element); $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); this._element.style[dimension]=this._element[scrollSize] + "px"; }; _proto.hide=function hide(){ var _this2=this; if(this._isTransitioning||!$$$1(this._element).hasClass(ClassName.SHOW)){ return; } var startEvent=$$$1.Event(Event.HIDE); $$$1(this._element).trigger(startEvent); if(startEvent.isDefaultPrevented()){ return; } var dimension=this._getDimension(); this._element.style[dimension]=this._element.getBoundingClientRect()[dimension] + "px"; Util.reflow(this._element); $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); var triggerArrayLength=this._triggerArray.length; if(triggerArrayLength > 0){ for (var i=0; i < triggerArrayLength; i++){ var trigger=this._triggerArray[i]; var selector=Util.getSelectorFromElement(trigger); if(selector!==null){ var $elem=$$$1([].slice.call(document.querySelectorAll(selector))); if(!$elem.hasClass(ClassName.SHOW)){ $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); }} }} this.setTransitioning(true); var complete=function complete(){ _this2.setTransitioning(false); $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); }; this._element.style[dimension]=''; var transitionDuration=Util.getTransitionDurationFromElement(this._element); $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); }; _proto.setTransitioning=function setTransitioning(isTransitioning){ this._isTransitioning=isTransitioning; }; _proto.dispose=function dispose(){ $$$1.removeData(this._element, DATA_KEY); this._config=null; this._parent=null; this._element=null; this._triggerArray=null; this._isTransitioning=null; }; _proto._getConfig=function _getConfig(config){ config=_objectSpread({}, Default, config); config.toggle=Boolean(config.toggle); Util.typeCheckConfig(NAME, config, DefaultType); return config; }; _proto._getDimension=function _getDimension(){ var hasWidth=$$$1(this._element).hasClass(Dimension.WIDTH); return hasWidth ? Dimension.WIDTH:Dimension.HEIGHT; }; _proto._getParent=function _getParent(){ var _this3=this; var parent=null; if(Util.isElement(this._config.parent)){ parent=this._config.parent; if(typeof this._config.parent.jquery!=='undefined'){ parent=this._config.parent[0]; }}else{ parent=document.querySelector(this._config.parent); } var selector="[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; var children=[].slice.call(parent.querySelectorAll(selector)); $$$1(children).each(function (i, element){ _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); }); return parent; }; _proto._addAriaAndCollapsedClass=function _addAriaAndCollapsedClass(element, triggerArray){ if(element){ var isOpen=$$$1(element).hasClass(ClassName.SHOW); if(triggerArray.length){ $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); }} }; Collapse._getTargetFromElement=function _getTargetFromElement(element){ var selector=Util.getSelectorFromElement(element); return selector ? document.querySelector(selector):null; }; Collapse._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var $this=$$$1(this); var data=$this.data(DATA_KEY); var _config=_objectSpread({}, Default, $this.data(), typeof config==='object'&&config ? config:{}); if(!data&&_config.toggle&&/show|hide/.test(config)){ _config.toggle=false; } if(!data){ data=new Collapse(this, _config); $this.data(DATA_KEY, data); } if(typeof config==='string'){ if(typeof data[config]==='undefined'){ throw new TypeError("No method named \"" + config + "\""); } data[config](); }}); }; _createClass(Collapse, null, [{ key: "VERSION", get: function get(){ return VERSION; }}, { key: "Default", get: function get(){ return Default; }}]); return Collapse; }(); $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event){ if(event.currentTarget.tagName==='A'){ event.preventDefault(); } var $trigger=$$$1(this); var selector=Util.getSelectorFromElement(this); var selectors=[].slice.call(document.querySelectorAll(selector)); $$$1(selectors).each(function (){ var $target=$$$1(this); var data=$target.data(DATA_KEY); var config=data ? 'toggle':$trigger.data(); Collapse._jQueryInterface.call($target, config); }); }); $$$1.fn[NAME]=Collapse._jQueryInterface; $$$1.fn[NAME].Constructor=Collapse; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Collapse._jQueryInterface; }; return Collapse; }($); var Dropdown=function ($$$1){ var NAME='dropdown'; var VERSION='4.1.3'; var DATA_KEY='bs.dropdown'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var ESCAPE_KEYCODE=27; var SPACE_KEYCODE=32; var TAB_KEYCODE=9; var ARROW_UP_KEYCODE=38; var ARROW_DOWN_KEYCODE=40; var RIGHT_MOUSE_BUTTON_WHICH=3; var REGEXP_KEYDOWN=new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); var Event={ HIDE: "hide" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY, SHOW: "show" + EVENT_KEY, SHOWN: "shown" + EVENT_KEY, CLICK: "click" + EVENT_KEY, CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY, KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY }; var ClassName={ DISABLED: 'disabled', SHOW: 'show', DROPUP: 'dropup', DROPRIGHT: 'dropright', DROPLEFT: 'dropleft', MENURIGHT: 'dropdown-menu-right', MENULEFT: 'dropdown-menu-left', POSITION_STATIC: 'position-static' }; var Selector={ DATA_TOGGLE: '[data-toggle="dropdown"]', FORM_CHILD: '.dropdown form', MENU: '.dropdown-menu', NAVBAR_NAV: '.navbar-nav', VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' }; var AttachmentMap={ TOP: 'top-start', TOPEND: 'top-end', BOTTOM: 'bottom-start', BOTTOMEND: 'bottom-end', RIGHT: 'right-start', RIGHTEND: 'right-end', LEFT: 'left-start', LEFTEND: 'left-end' }; var Default={ offset: 0, flip: true, boundary: 'scrollParent', reference: 'toggle', display: 'dynamic' }; var DefaultType={ offset: '(number|string|function)', flip: 'boolean', boundary: '(string|element)', reference: '(string|element)', display: 'string' }; var Dropdown = function (){ function Dropdown(element, config){ this._element=element; this._popper=null; this._config=this._getConfig(config); this._menu=this._getMenuElement(); this._inNavbar=this._detectNavbar(); this._addEventListeners(); } var _proto=Dropdown.prototype; _proto.toggle=function toggle(){ if(this._element.disabled||$$$1(this._element).hasClass(ClassName.DISABLED)){ return; } var parent=Dropdown._getParentFromElement(this._element); var isActive=$$$1(this._menu).hasClass(ClassName.SHOW); Dropdown._clearMenus(); if(isActive){ return; } var relatedTarget={ relatedTarget: this._element }; var showEvent=$$$1.Event(Event.SHOW, relatedTarget); $$$1(parent).trigger(showEvent); if(showEvent.isDefaultPrevented()){ return; } if(!this._inNavbar){ if(typeof Popper==='undefined'){ throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)'); } var referenceElement=this._element; if(this._config.reference==='parent'){ referenceElement=parent; }else if(Util.isElement(this._config.reference)){ referenceElement=this._config.reference; if(typeof this._config.reference.jquery!=='undefined'){ referenceElement=this._config.reference[0]; }} if(this._config.boundary!=='scrollParent'){ $$$1(parent).addClass(ClassName.POSITION_STATIC); } this._popper=new Popper(referenceElement, this._menu, this._getPopperConfig()); } if('ontouchstart' in document.documentElement&&$$$1(parent).closest(Selector.NAVBAR_NAV).length===0){ $$$1(document.body).children().on('mouseover', null, $$$1.noop); } this._element.focus(); this._element.setAttribute('aria-expanded', true); $$$1(this._menu).toggleClass(ClassName.SHOW); $$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget)); }; _proto.dispose=function dispose(){ $$$1.removeData(this._element, DATA_KEY); $$$1(this._element).off(EVENT_KEY); this._element=null; this._menu=null; if(this._popper!==null){ this._popper.destroy(); this._popper=null; }}; _proto.update=function update(){ this._inNavbar=this._detectNavbar(); if(this._popper!==null){ this._popper.scheduleUpdate(); }}; _proto._addEventListeners=function _addEventListeners(){ var _this=this; $$$1(this._element).on(Event.CLICK, function (event){ event.preventDefault(); event.stopPropagation(); _this.toggle(); }); }; _proto._getConfig=function _getConfig(config){ config=_objectSpread({}, this.constructor.Default, $$$1(this._element).data(), config); Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); return config; }; _proto._getMenuElement=function _getMenuElement(){ if(!this._menu){ var parent=Dropdown._getParentFromElement(this._element); if(parent){ this._menu=parent.querySelector(Selector.MENU); }} return this._menu; }; _proto._getPlacement=function _getPlacement(){ var $parentDropdown=$$$1(this._element.parentNode); var placement=AttachmentMap.BOTTOM; if($parentDropdown.hasClass(ClassName.DROPUP)){ placement=AttachmentMap.TOP; if($$$1(this._menu).hasClass(ClassName.MENURIGHT)){ placement=AttachmentMap.TOPEND; }}else if($parentDropdown.hasClass(ClassName.DROPRIGHT)){ placement=AttachmentMap.RIGHT; }else if($parentDropdown.hasClass(ClassName.DROPLEFT)){ placement=AttachmentMap.LEFT; }else if($$$1(this._menu).hasClass(ClassName.MENURIGHT)){ placement=AttachmentMap.BOTTOMEND; } return placement; }; _proto._detectNavbar=function _detectNavbar(){ return $$$1(this._element).closest('.navbar').length > 0; }; _proto._getPopperConfig=function _getPopperConfig(){ var _this2=this; var offsetConf={}; if(typeof this._config.offset==='function'){ offsetConf.fn=function (data){ data.offsets=_objectSpread({}, data.offsets, _this2._config.offset(data.offsets)||{}); return data; };}else{ offsetConf.offset=this._config.offset; } var popperConfig={ placement: this._getPlacement(), modifiers: { offset: offsetConf, flip: { enabled: this._config.flip }, preventOverflow: { boundariesElement: this._config.boundary }} }; if(this._config.display==='static'){ popperConfig.modifiers.applyStyle={ enabled: false };} return popperConfig; }; Dropdown._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var data=$$$1(this).data(DATA_KEY); var _config=typeof config==='object' ? config:null; if(!data){ data=new Dropdown(this, _config); $$$1(this).data(DATA_KEY, data); } if(typeof config==='string'){ if(typeof data[config]==='undefined'){ throw new TypeError("No method named \"" + config + "\""); } data[config](); }}); }; Dropdown._clearMenus=function _clearMenus(event){ if(event&&(event.which===RIGHT_MOUSE_BUTTON_WHICH||event.type==='keyup'&&event.which!==TAB_KEYCODE)){ return; } var toggles=[].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE)); for (var i=0, len=toggles.length; i < len; i++){ var parent=Dropdown._getParentFromElement(toggles[i]); var context=$$$1(toggles[i]).data(DATA_KEY); var relatedTarget={ relatedTarget: toggles[i] }; if(event&&event.type==='click'){ relatedTarget.clickEvent=event; } if(!context){ continue; } var dropdownMenu=context._menu; if(!$$$1(parent).hasClass(ClassName.SHOW)){ continue; } if(event&&(event.type==='click'&&/input|textarea/i.test(event.target.tagName)||event.type==='keyup'&&event.which===TAB_KEYCODE)&&$$$1.contains(parent, event.target)){ continue; } var hideEvent=$$$1.Event(Event.HIDE, relatedTarget); $$$1(parent).trigger(hideEvent); if(hideEvent.isDefaultPrevented()){ continue; } if('ontouchstart' in document.documentElement){ $$$1(document.body).children().off('mouseover', null, $$$1.noop); } toggles[i].setAttribute('aria-expanded', 'false'); $$$1(dropdownMenu).removeClass(ClassName.SHOW); $$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget)); }}; Dropdown._getParentFromElement=function _getParentFromElement(element){ var parent; var selector=Util.getSelectorFromElement(element); if(selector){ parent=document.querySelector(selector); } return parent||element.parentNode; }; Dropdown._dataApiKeydownHandler=function _dataApiKeydownHandler(event){ if(/input|textarea/i.test(event.target.tagName) ? event.which===SPACE_KEYCODE||event.which!==ESCAPE_KEYCODE&&(event.which!==ARROW_DOWN_KEYCODE&&event.which!==ARROW_UP_KEYCODE||$$$1(event.target).closest(Selector.MENU).length):!REGEXP_KEYDOWN.test(event.which)){ return; } event.preventDefault(); event.stopPropagation(); if(this.disabled||$$$1(this).hasClass(ClassName.DISABLED)){ return; } var parent=Dropdown._getParentFromElement(this); var isActive=$$$1(parent).hasClass(ClassName.SHOW); if(!isActive&&(event.which!==ESCAPE_KEYCODE||event.which!==SPACE_KEYCODE)||isActive&&(event.which===ESCAPE_KEYCODE||event.which===SPACE_KEYCODE)){ if(event.which===ESCAPE_KEYCODE){ var toggle=parent.querySelector(Selector.DATA_TOGGLE); $$$1(toggle).trigger('focus'); } $$$1(this).trigger('click'); return; } var items=[].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS)); if(items.length===0){ return; } var index=items.indexOf(event.target); if(event.which===ARROW_UP_KEYCODE&&index > 0){ index--; } if(event.which===ARROW_DOWN_KEYCODE&&index < items.length - 1){ index++; } if(index < 0){ index=0; } items[index].focus(); }; _createClass(Dropdown, null, [{ key: "VERSION", get: function get(){ return VERSION; }}, { key: "Default", get: function get(){ return Default; }}, { key: "DefaultType", get: function get(){ return DefaultType; }}]); return Dropdown; }(); $$$1(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event){ event.preventDefault(); event.stopPropagation(); Dropdown._jQueryInterface.call($$$1(this), 'toggle'); }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e){ e.stopPropagation(); }); $$$1.fn[NAME]=Dropdown._jQueryInterface; $$$1.fn[NAME].Constructor=Dropdown; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Dropdown._jQueryInterface; }; return Dropdown; }($, Popper); var Modal=function ($$$1){ var NAME='modal'; var VERSION='4.1.3'; var DATA_KEY='bs.modal'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var ESCAPE_KEYCODE=27; var Default={ backdrop: true, keyboard: true, focus: true, show: true }; var DefaultType={ backdrop: '(boolean|string)', keyboard: 'boolean', focus: 'boolean', show: 'boolean' }; var Event={ HIDE: "hide" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY, SHOW: "show" + EVENT_KEY, SHOWN: "shown" + EVENT_KEY, FOCUSIN: "focusin" + EVENT_KEY, RESIZE: "resize" + EVENT_KEY, CLICK_DISMISS: "click.dismiss" + EVENT_KEY, KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY, MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY, MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY, CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY }; var ClassName={ SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', FADE: 'fade', SHOW: 'show' }; var Selector={ DIALOG: '.modal-dialog', DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', STICKY_CONTENT: '.sticky-top' }; var Modal = function (){ function Modal(element, config){ this._config=this._getConfig(config); this._element=element; this._dialog=element.querySelector(Selector.DIALOG); this._backdrop=null; this._isShown=false; this._isBodyOverflowing=false; this._ignoreBackdropClick=false; this._scrollbarWidth=0; } var _proto=Modal.prototype; _proto.toggle=function toggle(relatedTarget){ return this._isShown ? this.hide():this.show(relatedTarget); }; _proto.show=function show(relatedTarget){ var _this=this; if(this._isTransitioning||this._isShown){ return; } if($$$1(this._element).hasClass(ClassName.FADE)){ this._isTransitioning=true; } var showEvent=$$$1.Event(Event.SHOW, { relatedTarget: relatedTarget }); $$$1(this._element).trigger(showEvent); if(this._isShown||showEvent.isDefaultPrevented()){ return; } this._isShown=true; this._checkScrollbar(); this._setScrollbar(); this._adjustDialog(); $$$1(document.body).addClass(ClassName.OPEN); this._setEscapeEvent(); this._setResizeEvent(); $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event){ return _this.hide(event); }); $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function (){ $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event){ if($$$1(event.target).is(_this._element)){ _this._ignoreBackdropClick=true; }}); }); this._showBackdrop(function (){ return _this._showElement(relatedTarget); }); }; _proto.hide=function hide(event){ var _this2=this; if(event){ event.preventDefault(); } if(this._isTransitioning||!this._isShown){ return; } var hideEvent=$$$1.Event(Event.HIDE); $$$1(this._element).trigger(hideEvent); if(!this._isShown||hideEvent.isDefaultPrevented()){ return; } this._isShown=false; var transition=$$$1(this._element).hasClass(ClassName.FADE); if(transition){ this._isTransitioning=true; } this._setEscapeEvent(); this._setResizeEvent(); $$$1(document).off(Event.FOCUSIN); $$$1(this._element).removeClass(ClassName.SHOW); $$$1(this._element).off(Event.CLICK_DISMISS); $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS); if(transition){ var transitionDuration=Util.getTransitionDurationFromElement(this._element); $$$1(this._element).one(Util.TRANSITION_END, function (event){ return _this2._hideModal(event); }).emulateTransitionEnd(transitionDuration); }else{ this._hideModal(); }}; _proto.dispose=function dispose(){ $$$1.removeData(this._element, DATA_KEY); $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY); this._config=null; this._element=null; this._dialog=null; this._backdrop=null; this._isShown=null; this._isBodyOverflowing=null; this._ignoreBackdropClick=null; this._scrollbarWidth=null; }; _proto.handleUpdate=function handleUpdate(){ this._adjustDialog(); }; _proto._getConfig=function _getConfig(config){ config=_objectSpread({}, Default, config); Util.typeCheckConfig(NAME, config, DefaultType); return config; }; _proto._showElement=function _showElement(relatedTarget){ var _this3=this; var transition=$$$1(this._element).hasClass(ClassName.FADE); if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE){ document.body.appendChild(this._element); } this._element.style.display='block'; this._element.removeAttribute('aria-hidden'); this._element.scrollTop=0; if(transition){ Util.reflow(this._element); } $$$1(this._element).addClass(ClassName.SHOW); if(this._config.focus){ this._enforceFocus(); } var shownEvent=$$$1.Event(Event.SHOWN, { relatedTarget: relatedTarget }); var transitionComplete=function transitionComplete(){ if(_this3._config.focus){ _this3._element.focus(); } _this3._isTransitioning=false; $$$1(_this3._element).trigger(shownEvent); }; if(transition){ var transitionDuration=Util.getTransitionDurationFromElement(this._element); $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); }else{ transitionComplete(); }}; _proto._enforceFocus=function _enforceFocus(){ var _this4=this; $$$1(document).off(Event.FOCUSIN) .on(Event.FOCUSIN, function (event){ if(document!==event.target&&_this4._element!==event.target&&$$$1(_this4._element).has(event.target).length===0){ _this4._element.focus(); }}); }; _proto._setEscapeEvent=function _setEscapeEvent(){ var _this5=this; if(this._isShown&&this._config.keyboard){ $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event){ if(event.which===ESCAPE_KEYCODE){ event.preventDefault(); _this5.hide(); }}); }else if(!this._isShown){ $$$1(this._element).off(Event.KEYDOWN_DISMISS); }}; _proto._setResizeEvent=function _setResizeEvent(){ var _this6=this; if(this._isShown){ $$$1(window).on(Event.RESIZE, function (event){ return _this6.handleUpdate(event); }); }else{ $$$1(window).off(Event.RESIZE); }}; _proto._hideModal=function _hideModal(){ var _this7=this; this._element.style.display='none'; this._element.setAttribute('aria-hidden', true); this._isTransitioning=false; this._showBackdrop(function (){ $$$1(document.body).removeClass(ClassName.OPEN); _this7._resetAdjustments(); _this7._resetScrollbar(); $$$1(_this7._element).trigger(Event.HIDDEN); }); }; _proto._removeBackdrop=function _removeBackdrop(){ if(this._backdrop){ $$$1(this._backdrop).remove(); this._backdrop=null; }}; _proto._showBackdrop=function _showBackdrop(callback){ var _this8=this; var animate=$$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE:''; if(this._isShown&&this._config.backdrop){ this._backdrop=document.createElement('div'); this._backdrop.className=ClassName.BACKDROP; if(animate){ this._backdrop.classList.add(animate); } $$$1(this._backdrop).appendTo(document.body); $$$1(this._element).on(Event.CLICK_DISMISS, function (event){ if(_this8._ignoreBackdropClick){ _this8._ignoreBackdropClick=false; return; } if(event.target!==event.currentTarget){ return; } if(_this8._config.backdrop==='static'){ _this8._element.focus(); }else{ _this8.hide(); }}); if(animate){ Util.reflow(this._backdrop); } $$$1(this._backdrop).addClass(ClassName.SHOW); if(!callback){ return; } if(!animate){ callback(); return; } var backdropTransitionDuration=Util.getTransitionDurationFromElement(this._backdrop); $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); }else if(!this._isShown&&this._backdrop){ $$$1(this._backdrop).removeClass(ClassName.SHOW); var callbackRemove=function callbackRemove(){ _this8._removeBackdrop(); if(callback){ callback(); }}; if($$$1(this._element).hasClass(ClassName.FADE)){ var _backdropTransitionDuration=Util.getTransitionDurationFromElement(this._backdrop); $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); }else{ callbackRemove(); }}else if(callback){ callback(); }}; _proto._adjustDialog=function _adjustDialog(){ var isModalOverflowing=this._element.scrollHeight > document.documentElement.clientHeight; if(!this._isBodyOverflowing&&isModalOverflowing){ this._element.style.paddingLeft=this._scrollbarWidth + "px"; } if(this._isBodyOverflowing&&!isModalOverflowing){ this._element.style.paddingRight=this._scrollbarWidth + "px"; }}; _proto._resetAdjustments=function _resetAdjustments(){ this._element.style.paddingLeft=''; this._element.style.paddingRight=''; }; _proto._checkScrollbar=function _checkScrollbar(){ var rect=document.body.getBoundingClientRect(); this._isBodyOverflowing=rect.left + rect.right < window.innerWidth; this._scrollbarWidth=this._getScrollbarWidth(); }; _proto._setScrollbar=function _setScrollbar(){ var _this9=this; if(this._isBodyOverflowing){ var fixedContent=[].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); var stickyContent=[].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); $$$1(fixedContent).each(function (index, element){ var actualPadding=element.style.paddingRight; var calculatedPadding=$$$1(element).css('padding-right'); $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); }); $$$1(stickyContent).each(function (index, element){ var actualMargin=element.style.marginRight; var calculatedMargin=$$$1(element).css('margin-right'); $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); }); var actualPadding=document.body.style.paddingRight; var calculatedPadding=$$$1(document.body).css('padding-right'); $$$1(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); }}; _proto._resetScrollbar=function _resetScrollbar(){ var fixedContent=[].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT)); $$$1(fixedContent).each(function (index, element){ var padding=$$$1(element).data('padding-right'); $$$1(element).removeData('padding-right'); element.style.paddingRight=padding ? padding:''; }); var elements=[].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT)); $$$1(elements).each(function (index, element){ var margin=$$$1(element).data('margin-right'); if(typeof margin!=='undefined'){ $$$1(element).css('margin-right', margin).removeData('margin-right'); }}); var padding=$$$1(document.body).data('padding-right'); $$$1(document.body).removeData('padding-right'); document.body.style.paddingRight=padding ? padding:''; }; _proto._getScrollbarWidth=function _getScrollbarWidth(){ var scrollDiv=document.createElement('div'); scrollDiv.className=ClassName.SCROLLBAR_MEASURER; document.body.appendChild(scrollDiv); var scrollbarWidth=scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; }; Modal._jQueryInterface=function _jQueryInterface(config, relatedTarget){ return this.each(function (){ var data=$$$1(this).data(DATA_KEY); var _config=_objectSpread({}, Default, $$$1(this).data(), typeof config==='object'&&config ? config:{}); if(!data){ data=new Modal(this, _config); $$$1(this).data(DATA_KEY, data); } if(typeof config==='string'){ if(typeof data[config]==='undefined'){ throw new TypeError("No method named \"" + config + "\""); } data[config](relatedTarget); }else if(_config.show){ data.show(relatedTarget); }}); }; _createClass(Modal, null, [{ key: "VERSION", get: function get(){ return VERSION; }}, { key: "Default", get: function get(){ return Default; }}]); return Modal; }(); $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event){ var _this10=this; var target; var selector=Util.getSelectorFromElement(this); if(selector){ target=document.querySelector(selector); } var config=$$$1(target).data(DATA_KEY) ? 'toggle':_objectSpread({}, $$$1(target).data(), $$$1(this).data()); if(this.tagName==='A'||this.tagName==='AREA'){ event.preventDefault(); } var $target=$$$1(target).one(Event.SHOW, function (showEvent){ if(showEvent.isDefaultPrevented()){ return; } $target.one(Event.HIDDEN, function (){ if($$$1(_this10).is(':visible')){ _this10.focus(); }}); }); Modal._jQueryInterface.call($$$1(target), config, this); }); $$$1.fn[NAME]=Modal._jQueryInterface; $$$1.fn[NAME].Constructor=Modal; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Modal._jQueryInterface; }; return Modal; }($); var Tooltip=function ($$$1){ var NAME='tooltip'; var VERSION='4.1.3'; var DATA_KEY='bs.tooltip'; var EVENT_KEY="." + DATA_KEY; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var CLASS_PREFIX='bs-tooltip'; var BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); var DefaultType={ animation: 'boolean', template: 'string', title: '(string|element|function)', trigger: 'string', delay: '(number|object)', html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', offset: '(number|string)', container: '(string|element|boolean)', fallbackPlacement: '(string|array)', boundary: '(string|element)' }; var AttachmentMap={ AUTO: 'auto', TOP: 'top', RIGHT: 'right', BOTTOM: 'bottom', LEFT: 'left' }; var Default={ animation: true, template: '', trigger: 'hover focus', title: '', delay: 0, html: false, selector: false, placement: 'top', offset: 0, container: false, fallbackPlacement: 'flip', boundary: 'scrollParent' }; var HoverState={ SHOW: 'show', OUT: 'out' }; var Event={ HIDE: "hide" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY, SHOW: "show" + EVENT_KEY, SHOWN: "shown" + EVENT_KEY, INSERTED: "inserted" + EVENT_KEY, CLICK: "click" + EVENT_KEY, FOCUSIN: "focusin" + EVENT_KEY, FOCUSOUT: "focusout" + EVENT_KEY, MOUSEENTER: "mouseenter" + EVENT_KEY, MOUSELEAVE: "mouseleave" + EVENT_KEY }; var ClassName={ FADE: 'fade', SHOW: 'show' }; var Selector={ TOOLTIP: '.tooltip', TOOLTIP_INNER: '.tooltip-inner', ARROW: '.arrow' }; var Trigger={ HOVER: 'hover', FOCUS: 'focus', CLICK: 'click', MANUAL: 'manual' }; var Tooltip = function (){ function Tooltip(element, config){ if(typeof Popper==='undefined'){ throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)'); } this._isEnabled=true; this._timeout=0; this._hoverState=''; this._activeTrigger={}; this._popper=null; this.element=element; this.config=this._getConfig(config); this.tip=null; this._setListeners(); } var _proto=Tooltip.prototype; _proto.enable=function enable(){ this._isEnabled=true; }; _proto.disable=function disable(){ this._isEnabled=false; }; _proto.toggleEnabled=function toggleEnabled(){ this._isEnabled = !this._isEnabled; }; _proto.toggle=function toggle(event){ if(!this._isEnabled){ return; } if(event){ var dataKey=this.constructor.DATA_KEY; var context=$$$1(event.currentTarget).data(dataKey); if(!context){ context=new this.constructor(event.currentTarget, this._getDelegateConfig()); $$$1(event.currentTarget).data(dataKey, context); } context._activeTrigger.click = !context._activeTrigger.click; if(context._isWithActiveTrigger()){ context._enter(null, context); }else{ context._leave(null, context); }}else{ if($$$1(this.getTipElement()).hasClass(ClassName.SHOW)){ this._leave(null, this); return; } this._enter(null, this); }}; _proto.dispose=function dispose(){ clearTimeout(this._timeout); $$$1.removeData(this.element, this.constructor.DATA_KEY); $$$1(this.element).off(this.constructor.EVENT_KEY); $$$1(this.element).closest('.modal').off('hide.bs.modal'); if(this.tip){ $$$1(this.tip).remove(); } this._isEnabled=null; this._timeout=null; this._hoverState=null; this._activeTrigger=null; if(this._popper!==null){ this._popper.destroy(); } this._popper=null; this.element=null; this.config=null; this.tip=null; }; _proto.show=function show(){ var _this=this; if($$$1(this.element).css('display')==='none'){ throw new Error('Please use show on visible elements'); } var showEvent=$$$1.Event(this.constructor.Event.SHOW); if(this.isWithContent()&&this._isEnabled){ $$$1(this.element).trigger(showEvent); var isInTheDom=$$$1.contains(this.element.ownerDocument.documentElement, this.element); if(showEvent.isDefaultPrevented()||!isInTheDom){ return; } var tip=this.getTipElement(); var tipId=Util.getUID(this.constructor.NAME); tip.setAttribute('id', tipId); this.element.setAttribute('aria-describedby', tipId); this.setContent(); if(this.config.animation){ $$$1(tip).addClass(ClassName.FADE); } var placement=typeof this.config.placement==='function' ? this.config.placement.call(this, tip, this.element):this.config.placement; var attachment=this._getAttachment(placement); this.addAttachmentClass(attachment); var container=this.config.container===false ? document.body:$$$1(document).find(this.config.container); $$$1(tip).data(this.constructor.DATA_KEY, this); if(!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)){ $$$1(tip).appendTo(container); } $$$1(this.element).trigger(this.constructor.Event.INSERTED); this._popper=new Popper(this.element, tip, { placement: attachment, modifiers: { offset: { offset: this.config.offset }, flip: { behavior: this.config.fallbackPlacement }, arrow: { element: Selector.ARROW }, preventOverflow: { boundariesElement: this.config.boundary }}, onCreate: function onCreate(data){ if(data.originalPlacement!==data.placement){ _this._handlePopperPlacementChange(data); }}, onUpdate: function onUpdate(data){ _this._handlePopperPlacementChange(data); }}); $$$1(tip).addClass(ClassName.SHOW); if('ontouchstart' in document.documentElement){ $$$1(document.body).children().on('mouseover', null, $$$1.noop); } var complete=function complete(){ if(_this.config.animation){ _this._fixTransition(); } var prevHoverState=_this._hoverState; _this._hoverState=null; $$$1(_this.element).trigger(_this.constructor.Event.SHOWN); if(prevHoverState===HoverState.OUT){ _this._leave(null, _this); }}; if($$$1(this.tip).hasClass(ClassName.FADE)){ var transitionDuration=Util.getTransitionDurationFromElement(this.tip); $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); }else{ complete(); }} }; _proto.hide=function hide(callback){ var _this2=this; var tip=this.getTipElement(); var hideEvent=$$$1.Event(this.constructor.Event.HIDE); var complete=function complete(){ if(_this2._hoverState!==HoverState.SHOW&&tip.parentNode){ tip.parentNode.removeChild(tip); } _this2._cleanTipClass(); _this2.element.removeAttribute('aria-describedby'); $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN); if(_this2._popper!==null){ _this2._popper.destroy(); } if(callback){ callback(); }}; $$$1(this.element).trigger(hideEvent); if(hideEvent.isDefaultPrevented()){ return; } $$$1(tip).removeClass(ClassName.SHOW); if('ontouchstart' in document.documentElement){ $$$1(document.body).children().off('mouseover', null, $$$1.noop); } this._activeTrigger[Trigger.CLICK]=false; this._activeTrigger[Trigger.FOCUS]=false; this._activeTrigger[Trigger.HOVER]=false; if($$$1(this.tip).hasClass(ClassName.FADE)){ var transitionDuration=Util.getTransitionDurationFromElement(tip); $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); }else{ complete(); } this._hoverState=''; }; _proto.update=function update(){ if(this._popper!==null){ this._popper.scheduleUpdate(); }}; _proto.isWithContent=function isWithContent(){ return Boolean(this.getTitle()); }; _proto.addAttachmentClass=function addAttachmentClass(attachment){ $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); }; _proto.getTipElement=function getTipElement(){ this.tip=this.tip||$$$1(this.config.template)[0]; return this.tip; }; _proto.setContent=function setContent(){ var tip=this.getTipElement(); this.setElementContent($$$1(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle()); $$$1(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW); }; _proto.setElementContent=function setElementContent($element, content){ var html=this.config.html; if(typeof content==='object'&&(content.nodeType||content.jquery)){ if(html){ if(!$$$1(content).parent().is($element)){ $element.empty().append(content); }}else{ $element.text($$$1(content).text()); }}else{ $element[html ? 'html':'text'](content); }}; _proto.getTitle=function getTitle(){ var title=this.element.getAttribute('data-original-title'); if(!title){ title=typeof this.config.title==='function' ? this.config.title.call(this.element):this.config.title; } return title; }; _proto._getAttachment=function _getAttachment(placement){ return AttachmentMap[placement.toUpperCase()]; }; _proto._setListeners=function _setListeners(){ var _this3=this; var triggers=this.config.trigger.split(' '); triggers.forEach(function (trigger){ if(trigger==='click'){ $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event){ return _this3.toggle(event); }); }else if(trigger!==Trigger.MANUAL){ var eventIn=trigger===Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER:_this3.constructor.Event.FOCUSIN; var eventOut=trigger===Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE:_this3.constructor.Event.FOCUSOUT; $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event){ return _this3._enter(event); }).on(eventOut, _this3.config.selector, function (event){ return _this3._leave(event); }); } $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function (){ return _this3.hide(); }); }); if(this.config.selector){ this.config=_objectSpread({}, this.config, { trigger: 'manual', selector: '' }); }else{ this._fixTitle(); }}; _proto._fixTitle=function _fixTitle(){ var titleType=typeof this.element.getAttribute('data-original-title'); if(this.element.getAttribute('title')||titleType!=='string'){ this.element.setAttribute('data-original-title', this.element.getAttribute('title')||''); this.element.setAttribute('title', ''); }}; _proto._enter=function _enter(event, context){ var dataKey=this.constructor.DATA_KEY; context=context||$$$1(event.currentTarget).data(dataKey); if(!context){ context=new this.constructor(event.currentTarget, this._getDelegateConfig()); $$$1(event.currentTarget).data(dataKey, context); } if(event){ context._activeTrigger[event.type==='focusin' ? Trigger.FOCUS:Trigger.HOVER]=true; } if($$$1(context.getTipElement()).hasClass(ClassName.SHOW)||context._hoverState===HoverState.SHOW){ context._hoverState=HoverState.SHOW; return; } clearTimeout(context._timeout); context._hoverState=HoverState.SHOW; if(!context.config.delay||!context.config.delay.show){ context.show(); return; } context._timeout=setTimeout(function (){ if(context._hoverState===HoverState.SHOW){ context.show(); }}, context.config.delay.show); }; _proto._leave=function _leave(event, context){ var dataKey=this.constructor.DATA_KEY; context=context||$$$1(event.currentTarget).data(dataKey); if(!context){ context=new this.constructor(event.currentTarget, this._getDelegateConfig()); $$$1(event.currentTarget).data(dataKey, context); } if(event){ context._activeTrigger[event.type==='focusout' ? Trigger.FOCUS:Trigger.HOVER]=false; } if(context._isWithActiveTrigger()){ return; } clearTimeout(context._timeout); context._hoverState=HoverState.OUT; if(!context.config.delay||!context.config.delay.hide){ context.hide(); return; } context._timeout=setTimeout(function (){ if(context._hoverState===HoverState.OUT){ context.hide(); }}, context.config.delay.hide); }; _proto._isWithActiveTrigger=function _isWithActiveTrigger(){ for (var trigger in this._activeTrigger){ if(this._activeTrigger[trigger]){ return true; }} return false; }; _proto._getConfig=function _getConfig(config){ config=_objectSpread({}, this.constructor.Default, $$$1(this.element).data(), typeof config==='object'&&config ? config:{}); if(typeof config.delay==='number'){ config.delay={ show: config.delay, hide: config.delay };} if(typeof config.title==='number'){ config.title=config.title.toString(); } if(typeof config.content==='number'){ config.content=config.content.toString(); } Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); return config; }; _proto._getDelegateConfig=function _getDelegateConfig(){ var config={}; if(this.config){ for (var key in this.config){ if(this.constructor.Default[key]!==this.config[key]){ config[key]=this.config[key]; }} } return config; }; _proto._cleanTipClass=function _cleanTipClass(){ var $tip=$$$1(this.getTipElement()); var tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX); if(tabClass!==null&&tabClass.length){ $tip.removeClass(tabClass.join('')); }}; _proto._handlePopperPlacementChange=function _handlePopperPlacementChange(popperData){ var popperInstance=popperData.instance; this.tip=popperInstance.popper; this._cleanTipClass(); this.addAttachmentClass(this._getAttachment(popperData.placement)); }; _proto._fixTransition=function _fixTransition(){ var tip=this.getTipElement(); var initConfigAnimation=this.config.animation; if(tip.getAttribute('x-placement')!==null){ return; } $$$1(tip).removeClass(ClassName.FADE); this.config.animation=false; this.hide(); this.show(); this.config.animation=initConfigAnimation; }; Tooltip._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var data=$$$1(this).data(DATA_KEY); var _config=typeof config==='object'&&config; if(!data&&/dispose|hide/.test(config)){ return; } if(!data){ data=new Tooltip(this, _config); $$$1(this).data(DATA_KEY, data); } if(typeof config==='string'){ if(typeof data[config]==='undefined'){ throw new TypeError("No method named \"" + config + "\""); } data[config](); }}); }; _createClass(Tooltip, null, [{ key: "VERSION", get: function get(){ return VERSION; }}, { key: "Default", get: function get(){ return Default; }}, { key: "NAME", get: function get(){ return NAME; }}, { key: "DATA_KEY", get: function get(){ return DATA_KEY; }}, { key: "Event", get: function get(){ return Event; }}, { key: "EVENT_KEY", get: function get(){ return EVENT_KEY; }}, { key: "DefaultType", get: function get(){ return DefaultType; }}]); return Tooltip; }(); $$$1.fn[NAME]=Tooltip._jQueryInterface; $$$1.fn[NAME].Constructor=Tooltip; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Tooltip._jQueryInterface; }; return Tooltip; }($, Popper); var Popover=function ($$$1){ var NAME='popover'; var VERSION='4.1.3'; var DATA_KEY='bs.popover'; var EVENT_KEY="." + DATA_KEY; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var CLASS_PREFIX='bs-popover'; var BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); var Default=_objectSpread({}, Tooltip.Default, { placement: 'right', trigger: 'click', content: '', template: '' }); var DefaultType=_objectSpread({}, Tooltip.DefaultType, { content: '(string|element|function)' }); var ClassName={ FADE: 'fade', SHOW: 'show' }; var Selector={ TITLE: '.popover-header', CONTENT: '.popover-body' }; var Event={ HIDE: "hide" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY, SHOW: "show" + EVENT_KEY, SHOWN: "shown" + EVENT_KEY, INSERTED: "inserted" + EVENT_KEY, CLICK: "click" + EVENT_KEY, FOCUSIN: "focusin" + EVENT_KEY, FOCUSOUT: "focusout" + EVENT_KEY, MOUSEENTER: "mouseenter" + EVENT_KEY, MOUSELEAVE: "mouseleave" + EVENT_KEY }; var Popover = function (_Tooltip){ _inheritsLoose(Popover, _Tooltip); function Popover(){ return _Tooltip.apply(this, arguments)||this; } var _proto=Popover.prototype; _proto.isWithContent=function isWithContent(){ return this.getTitle()||this._getContent(); }; _proto.addAttachmentClass=function addAttachmentClass(attachment){ $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); }; _proto.getTipElement=function getTipElement(){ this.tip=this.tip||$$$1(this.config.template)[0]; return this.tip; }; _proto.setContent=function setContent(){ var $tip=$$$1(this.getTipElement()); this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); var content=this._getContent(); if(typeof content==='function'){ content=content.call(this.element); } this.setElementContent($tip.find(Selector.CONTENT), content); $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); }; _proto._getContent=function _getContent(){ return this.element.getAttribute('data-content')||this.config.content; }; _proto._cleanTipClass=function _cleanTipClass(){ var $tip=$$$1(this.getTipElement()); var tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX); if(tabClass!==null&&tabClass.length > 0){ $tip.removeClass(tabClass.join('')); }}; Popover._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var data=$$$1(this).data(DATA_KEY); var _config=typeof config==='object' ? config:null; if(!data&&/destroy|hide/.test(config)){ return; } if(!data){ data=new Popover(this, _config); $$$1(this).data(DATA_KEY, data); } if(typeof config==='string'){ if(typeof data[config]==='undefined'){ throw new TypeError("No method named \"" + config + "\""); } data[config](); }}); }; _createClass(Popover, null, [{ key: "VERSION", get: function get(){ return VERSION; }}, { key: "Default", get: function get(){ return Default; }}, { key: "NAME", get: function get(){ return NAME; }}, { key: "DATA_KEY", get: function get(){ return DATA_KEY; }}, { key: "Event", get: function get(){ return Event; }}, { key: "EVENT_KEY", get: function get(){ return EVENT_KEY; }}, { key: "DefaultType", get: function get(){ return DefaultType; }}]); return Popover; }(Tooltip); $$$1.fn[NAME]=Popover._jQueryInterface; $$$1.fn[NAME].Constructor=Popover; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Popover._jQueryInterface; }; return Popover; }($); var ScrollSpy=function ($$$1){ var NAME='scrollspy'; var VERSION='4.1.3'; var DATA_KEY='bs.scrollspy'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var Default={ offset: 10, method: 'auto', target: '' }; var DefaultType={ offset: 'number', method: 'string', target: '(string|element)' }; var Event={ ACTIVATE: "activate" + EVENT_KEY, SCROLL: "scroll" + EVENT_KEY, LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY }; var ClassName={ DROPDOWN_ITEM: 'dropdown-item', DROPDOWN_MENU: 'dropdown-menu', ACTIVE: 'active' }; var Selector={ DATA_SPY: '[data-spy="scroll"]', ACTIVE: '.active', NAV_LIST_GROUP: '.nav, .list-group', NAV_LINKS: '.nav-link', NAV_ITEMS: '.nav-item', LIST_ITEMS: '.list-group-item', DROPDOWN: '.dropdown', DROPDOWN_ITEMS: '.dropdown-item', DROPDOWN_TOGGLE: '.dropdown-toggle' }; var OffsetMethod={ OFFSET: 'offset', POSITION: 'position' }; var ScrollSpy = function (){ function ScrollSpy(element, config){ var _this=this; this._element=element; this._scrollElement=element.tagName==='BODY' ? window:element; this._config=this._getConfig(config); this._selector=this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS); this._offsets=[]; this._targets=[]; this._activeTarget=null; this._scrollHeight=0; $$$1(this._scrollElement).on(Event.SCROLL, function (event){ return _this._process(event); }); this.refresh(); this._process(); } var _proto=ScrollSpy.prototype; _proto.refresh=function refresh(){ var _this2=this; var autoMethod=this._scrollElement===this._scrollElement.window ? OffsetMethod.OFFSET:OffsetMethod.POSITION; var offsetMethod=this._config.method==='auto' ? autoMethod:this._config.method; var offsetBase=offsetMethod===OffsetMethod.POSITION ? this._getScrollTop():0; this._offsets=[]; this._targets=[]; this._scrollHeight=this._getScrollHeight(); var targets=[].slice.call(document.querySelectorAll(this._selector)); targets.map(function (element){ var target; var targetSelector=Util.getSelectorFromElement(element); if(targetSelector){ target=document.querySelector(targetSelector); } if(target){ var targetBCR=target.getBoundingClientRect(); if(targetBCR.width||targetBCR.height){ return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector]; }} return null; }).filter(function (item){ return item; }).sort(function (a, b){ return a[0] - b[0]; }).forEach(function (item){ _this2._offsets.push(item[0]); _this2._targets.push(item[1]); }); }; _proto.dispose=function dispose(){ $$$1.removeData(this._element, DATA_KEY); $$$1(this._scrollElement).off(EVENT_KEY); this._element=null; this._scrollElement=null; this._config=null; this._selector=null; this._offsets=null; this._targets=null; this._activeTarget=null; this._scrollHeight=null; }; _proto._getConfig=function _getConfig(config){ config=_objectSpread({}, Default, typeof config==='object'&&config ? config:{}); if(typeof config.target!=='string'){ var id=$$$1(config.target).attr('id'); if(!id){ id=Util.getUID(NAME); $$$1(config.target).attr('id', id); } config.target="#" + id; } Util.typeCheckConfig(NAME, config, DefaultType); return config; }; _proto._getScrollTop=function _getScrollTop(){ return this._scrollElement===window ? this._scrollElement.pageYOffset:this._scrollElement.scrollTop; }; _proto._getScrollHeight=function _getScrollHeight(){ return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); }; _proto._getOffsetHeight=function _getOffsetHeight(){ return this._scrollElement===window ? window.innerHeight:this._scrollElement.getBoundingClientRect().height; }; _proto._process=function _process(){ var scrollTop=this._getScrollTop() + this._config.offset; var scrollHeight=this._getScrollHeight(); var maxScroll=this._config.offset + scrollHeight - this._getOffsetHeight(); if(this._scrollHeight!==scrollHeight){ this.refresh(); } if(scrollTop >=maxScroll){ var target=this._targets[this._targets.length - 1]; if(this._activeTarget!==target){ this._activate(target); } return; } if(this._activeTarget&&scrollTop < this._offsets[0]&&this._offsets[0] > 0){ this._activeTarget=null; this._clear(); return; } var offsetLength=this._offsets.length; for (var i=offsetLength; i--;){ var isActiveTarget=this._activeTarget!==this._targets[i]&&scrollTop >=this._offsets[i]&&(typeof this._offsets[i + 1]==='undefined'||scrollTop < this._offsets[i + 1]); if(isActiveTarget){ this._activate(this._targets[i]); }} }; _proto._activate=function _activate(target){ this._activeTarget=target; this._clear(); var queries=this._selector.split(','); queries=queries.map(function (selector){ return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]"); }); var $link=$$$1([].slice.call(document.querySelectorAll(queries.join(',')))); if($link.hasClass(ClassName.DROPDOWN_ITEM)){ $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); $link.addClass(ClassName.ACTIVE); }else{ $link.addClass(ClassName.ACTIVE); $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); } $$$1(this._scrollElement).trigger(Event.ACTIVATE, { relatedTarget: target }); }; _proto._clear=function _clear(){ var nodes=[].slice.call(document.querySelectorAll(this._selector)); $$$1(nodes).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); }; ScrollSpy._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var data=$$$1(this).data(DATA_KEY); var _config=typeof config==='object'&&config; if(!data){ data=new ScrollSpy(this, _config); $$$1(this).data(DATA_KEY, data); } if(typeof config==='string'){ if(typeof data[config]==='undefined'){ throw new TypeError("No method named \"" + config + "\""); } data[config](); }}); }; _createClass(ScrollSpy, null, [{ key: "VERSION", get: function get(){ return VERSION; }}, { key: "Default", get: function get(){ return Default; }}]); return ScrollSpy; }(); $$$1(window).on(Event.LOAD_DATA_API, function (){ var scrollSpys=[].slice.call(document.querySelectorAll(Selector.DATA_SPY)); var scrollSpysLength=scrollSpys.length; for (var i=scrollSpysLength; i--;){ var $spy=$$$1(scrollSpys[i]); ScrollSpy._jQueryInterface.call($spy, $spy.data()); }}); $$$1.fn[NAME]=ScrollSpy._jQueryInterface; $$$1.fn[NAME].Constructor=ScrollSpy; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return ScrollSpy._jQueryInterface; }; return ScrollSpy; }($); var Tab=function ($$$1){ var NAME='tab'; var VERSION='4.1.3'; var DATA_KEY='bs.tab'; var EVENT_KEY="." + DATA_KEY; var DATA_API_KEY='.data-api'; var JQUERY_NO_CONFLICT=$$$1.fn[NAME]; var Event={ HIDE: "hide" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY, SHOW: "show" + EVENT_KEY, SHOWN: "shown" + EVENT_KEY, CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY }; var ClassName={ DROPDOWN_MENU: 'dropdown-menu', ACTIVE: 'active', DISABLED: 'disabled', FADE: 'fade', SHOW: 'show' }; var Selector={ DROPDOWN: '.dropdown', NAV_LIST_GROUP: '.nav, .list-group', ACTIVE: '.active', ACTIVE_UL: '> li > .active', DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', DROPDOWN_TOGGLE: '.dropdown-toggle', DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' }; var Tab = function (){ function Tab(element){ this._element=element; } var _proto=Tab.prototype; _proto.show=function show(){ var _this=this; if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$$$1(this._element).hasClass(ClassName.ACTIVE)||$$$1(this._element).hasClass(ClassName.DISABLED)){ return; } var target; var previous; var listElement=$$$1(this._element).closest(Selector.NAV_LIST_GROUP)[0]; var selector=Util.getSelectorFromElement(this._element); if(listElement){ var itemSelector=listElement.nodeName==='UL' ? Selector.ACTIVE_UL:Selector.ACTIVE; previous=$$$1.makeArray($$$1(listElement).find(itemSelector)); previous=previous[previous.length - 1]; } var hideEvent=$$$1.Event(Event.HIDE, { relatedTarget: this._element }); var showEvent=$$$1.Event(Event.SHOW, { relatedTarget: previous }); if(previous){ $$$1(previous).trigger(hideEvent); } $$$1(this._element).trigger(showEvent); if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented()){ return; } if(selector){ target=document.querySelector(selector); } this._activate(this._element, listElement); var complete=function complete(){ var hiddenEvent=$$$1.Event(Event.HIDDEN, { relatedTarget: _this._element }); var shownEvent=$$$1.Event(Event.SHOWN, { relatedTarget: previous }); $$$1(previous).trigger(hiddenEvent); $$$1(_this._element).trigger(shownEvent); }; if(target){ this._activate(target, target.parentNode, complete); }else{ complete(); }}; _proto.dispose=function dispose(){ $$$1.removeData(this._element, DATA_KEY); this._element=null; }; _proto._activate=function _activate(element, container, callback){ var _this2=this; var activeElements; if(container.nodeName==='UL'){ activeElements=$$$1(container).find(Selector.ACTIVE_UL); }else{ activeElements=$$$1(container).children(Selector.ACTIVE); } var active=activeElements[0]; var isTransitioning=callback&&active&&$$$1(active).hasClass(ClassName.FADE); var complete=function complete(){ return _this2._transitionComplete(element, active, callback); }; if(active&&isTransitioning){ var transitionDuration=Util.getTransitionDurationFromElement(active); $$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); }else{ complete(); }}; _proto._transitionComplete=function _transitionComplete(element, active, callback){ if(active){ $$$1(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE); var dropdownChild=$$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; if(dropdownChild){ $$$1(dropdownChild).removeClass(ClassName.ACTIVE); } if(active.getAttribute('role')==='tab'){ active.setAttribute('aria-selected', false); }} $$$1(element).addClass(ClassName.ACTIVE); if(element.getAttribute('role')==='tab'){ element.setAttribute('aria-selected', true); } Util.reflow(element); $$$1(element).addClass(ClassName.SHOW); if(element.parentNode&&$$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)){ var dropdownElement=$$$1(element).closest(Selector.DROPDOWN)[0]; if(dropdownElement){ var dropdownToggleList=[].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE)); $$$1(dropdownToggleList).addClass(ClassName.ACTIVE); } element.setAttribute('aria-expanded', true); } if(callback){ callback(); }}; Tab._jQueryInterface=function _jQueryInterface(config){ return this.each(function (){ var $this=$$$1(this); var data=$this.data(DATA_KEY); if(!data){ data=new Tab(this); $this.data(DATA_KEY, data); } if(typeof config==='string'){ if(typeof data[config]==='undefined'){ throw new TypeError("No method named \"" + config + "\""); } data[config](); }}); }; _createClass(Tab, null, [{ key: "VERSION", get: function get(){ return VERSION; }}]); return Tab; }(); $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event){ event.preventDefault(); Tab._jQueryInterface.call($$$1(this), 'show'); }); $$$1.fn[NAME]=Tab._jQueryInterface; $$$1.fn[NAME].Constructor=Tab; $$$1.fn[NAME].noConflict=function (){ $$$1.fn[NAME]=JQUERY_NO_CONFLICT; return Tab._jQueryInterface; }; return Tab; }($); (function ($$$1){ if(typeof $$$1==='undefined'){ throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); } var version=$$$1.fn.jquery.split(' ')[0].split('.'); var minMajor=1; var ltMajor=2; var minMinor=9; var minPatch=1; var maxMajor=4; if(version[0] < ltMajor&&version[1] < minMinor||version[0]===minMajor&&version[1]===minMinor&&version[2] < minPatch||version[0] >=maxMajor){ throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); }})($); exports.Util=Util; exports.Alert=Alert; exports.Button=Button; exports.Carousel=Carousel; exports.Collapse=Collapse; exports.Dropdown=Dropdown; exports.Modal=Modal; exports.Popover=Popover; exports.Scrollspy=ScrollSpy; exports.Tab=Tab; exports.Tooltip=Tooltip; Object.defineProperty(exports, '__esModule', { value: true }); }))); jQuery.easing['jswing']=jQuery.easing['swing']; jQuery.extend(jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d){ return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d){ return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d){ return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d){ return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d){ return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d){ return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d){ return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d){ return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d){ return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d){ if((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d){ return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d){ return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d){ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d){ return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d){ return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d){ if(t==0) return b; if(t==d) return b+c; if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d){ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d){ return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d){ if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; }, easeOutElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3; if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b; }, easeInOutElastic: function (x, t, b, c, d){ var s=1.70158;var p=0;var a=c; if(t==0) return b; if((t/=d/2)==2) return b+c; if(!p) p=d*(.3*1.5); if(a < Math.abs(c)){ a=c; var s=p/4; } else var s=p/(2*Math.PI) * Math.asin (c/a); if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s){ if(s==undefined) s=1.70158; if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d){ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d){ if((t/=d) < (1/2.75)){ return c*(7.5625*t*t) + b; }else if(t < (2/2.75)){ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; }else if(t < (2.5/2.75)){ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; }else{ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; }}, easeInOutBounce: function (x, t, b, c, d){ if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; }}); ;(function ($, window, undefined){ var $allDropdowns=$(); $.fn.dropdownHover=function (options){ if('ontouchstart' in document) return this; $allDropdowns=$allDropdowns.add(this.parent()); return this.each(function (){ var $this=$(this), $parent=$this.parent(), defaults={ delay: 500, instantlyCloseOthers: true }, data={ delay: $(this).data('delay'), instantlyCloseOthers: $(this).data('close-others') }, showEvent='show.bs.dropdown', hideEvent='hide.bs.dropdown', settings=$.extend(true, {}, defaults, options, data), timeout; $parent.hover(function (event){ if(!$parent.hasClass('open')&&!$this.is(event.target)){ return true; } $allDropdowns.find(':focus').blur(); if(settings.instantlyCloseOthers===true) $allDropdowns.removeClass('open'); window.clearTimeout(timeout); $parent.addClass('open'); $this.trigger(showEvent); }, function (){ timeout=window.setTimeout(function (){ $parent.removeClass('open'); $this.trigger(hideEvent); }, 200); }); $this.hover(function (){ $allDropdowns.find(':focus').blur(); if(settings.instantlyCloseOthers===true) $allDropdowns.removeClass('open'); window.clearTimeout(timeout); $parent.addClass('open'); $this.trigger(showEvent); }); $parent.find('.dropdown-submenu').each(function (){ var $this=$(this); var subTimeout; $this.hover(function (){ window.clearTimeout(subTimeout); $this.children('.dropdown-menu').show(); $this.siblings().children('.dropdown-menu').hide(); }, function (){ var $submenu=$this.children('.dropdown-menu'); subTimeout=window.setTimeout(function (){ $submenu.hide(); }, settings.delay); }); }); }); }; $(document).ready(function (){ $('[data-hover="dropdown"]').dropdownHover(); }); })(jQuery, this); (function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof exports==='object'){ module.exports=factory(require('jquery')); }else{ factory(jQuery); }}(function ($){ var pluses=/\+/g; function encode(s){ return config.raw ? s:encodeURIComponent(s); } function decode(s){ return config.raw ? s:decodeURIComponent(s); } function stringifyCookieValue(value){ return encode(config.json ? JSON.stringify(value):String(value)); } function parseCookieValue(s){ if(s.indexOf('"')===0){ s=s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } try { s=decodeURIComponent(s.replace(pluses, ' ')); return config.json ? JSON.parse(s):s; } catch(e){}} function read(s, converter){ var value=config.raw ? s:parseCookieValue(s); return $.isFunction(converter) ? converter(value):value; } var config=$.cookie=function (key, value, options){ if(arguments.length > 1&&!$.isFunction(value)){ options=$.extend({}, config.defaults, options); if(typeof options.expires==='number'){ var days=options.expires, t=options.expires=new Date(); t.setMilliseconds(t.getMilliseconds() + days * 864e+5); } return (document.cookie=[ encode(key), '=', stringifyCookieValue(value), options.expires ? '; expires=' + options.expires.toUTCString():'', options.path ? '; path=' + options.path:'', options.domain ? '; domain=' + options.domain:'', options.secure ? '; secure':'' ].join('')); } var result=key ? undefined:{}, cookies=document.cookie ? document.cookie.split('; '):[], i=0, l=cookies.length; for (; i < l; i++){ var parts=cookies[i].split('='), name=decode(parts.shift()), cookie=parts.join('='); if(key===name){ result=read(cookie, value); break; } if(!key&&(cookie=read(cookie))!==undefined){ result[name]=cookie; }} return result; }; config.defaults={}; $.removeCookie=function (key, options){ $.cookie(key, '', $.extend({}, options, { expires: -1 })); return !$.cookie(key); };})); ;(function($, window, document, undefined){ function Owl(element, options){ this.settings=null; this.options=$.extend({}, Owl.Defaults, options); this.$element=$(element); this._handlers={}; this._plugins={}; this._supress={}; this._current=null; this._speed=null; this._coordinates=[]; this._breakpoint=null; this._width=null; this._items=[]; this._clones=[]; this._mergers=[]; this._widths=[]; this._invalidated={}; this._pipe=[]; this._drag={ time: null, target: null, pointer: null, stage: { start: null, current: null }, direction: null }; this._states={ current: {}, tags: { 'initializing': [ 'busy' ], 'animating': [ 'busy' ], 'dragging': [ 'interacting' ] }}; $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler){ this._handlers[handler]=$.proxy(this[handler], this); }, this)); $.each(Owl.Plugins, $.proxy(function(key, plugin){ this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] = new plugin(this); }, this)); $.each(Owl.Workers, $.proxy(function(priority, worker){ this._pipe.push({ 'filter': worker.filter, 'run': $.proxy(worker.run, this) }); }, this)); this.setup(); this.initialize(); } Owl.Defaults={ items: 3, loop: false, center: false, rewind: false, checkVisibility: true, mouseDrag: true, touchDrag: true, pullDrag: true, freeDrag: false, margin: 0, stagePadding: 0, merge: false, mergeFit: true, autoWidth: false, startPosition: 0, rtl: false, smartSpeed: 250, fluidSpeed: false, dragEndSpeed: false, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: window, fallbackEasing: 'swing', slideTransition: '', info: false, nestedItemSelector: false, itemElement: 'div', stageElement: 'div', refreshClass: 'owl-refresh', loadedClass: 'owl-loaded', loadingClass: 'owl-loading', rtlClass: 'owl-rtl', responsiveClass: 'owl-responsive', dragClass: 'owl-drag', itemClass: 'owl-item', stageClass: 'owl-stage', stageOuterClass: 'owl-stage-outer', grabClass: 'owl-grab' }; Owl.Width={ Default: 'default', Inner: 'inner', Outer: 'outer' }; Owl.Type={ Event: 'event', State: 'state' }; Owl.Plugins={}; Owl.Workers=[ { filter: [ 'width', 'settings' ], run: function(){ this._width=this.$element.width(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=this._items&&this._items[this.relative(this._current)]; }}, { filter: [ 'items', 'settings' ], run: function(){ this.$stage.children('.cloned').remove(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var margin=this.settings.margin||'', grid = !this.settings.autoWidth, rtl=this.settings.rtl, css={ 'width': 'auto', 'margin-left': rtl ? margin:'', 'margin-right': rtl ? '':margin }; !grid&&this.$stage.children().css(css); cache.css=css; }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var width=(this.width() / this.settings.items).toFixed(3) - this.settings.margin, merge=null, iterator=this._items.length, grid = !this.settings.autoWidth, widths=[]; cache.items={ merge: false, width: width }; while (iterator--){ merge=this._mergers[iterator]; merge=this.settings.mergeFit&&Math.min(merge, this.settings.items)||merge; cache.items.merge=merge > 1||cache.items.merge; widths[iterator] = !grid ? this._items[iterator].width():width * merge; } this._widths=widths; }}, { filter: [ 'items', 'settings' ], run: function(){ var clones=[], items=this._items, settings=this.settings, view=Math.max(settings.items * 2, 4), size=Math.ceil(items.length / 2) * 2, repeat=settings.loop&&items.length ? settings.rewind ? view:Math.max(view, size):0, append='', prepend=''; repeat /=2; while (repeat > 0){ clones.push(this.normalize(clones.length / 2, true)); append=append + items[clones[clones.length - 1]][0].outerHTML; clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true)); prepend=items[clones[clones.length - 1]][0].outerHTML + prepend; repeat -=1; } this._clones=clones; $(append).addClass('cloned').appendTo(this.$stage); $(prepend).addClass('cloned').prependTo(this.$stage); }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, size=this._clones.length + this._items.length, iterator=-1, previous=0, current=0, coordinates=[]; while (++iterator < size){ previous=coordinates[iterator - 1]||0; current=this._widths[this.relative(iterator)] + this.settings.margin; coordinates.push(previous + current * rtl); } this._coordinates=coordinates; }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var padding=this.settings.stagePadding, coordinates=this._coordinates, css={ 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2, 'padding-left': padding||'', 'padding-right': padding||'' }; this.$stage.css(css); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var iterator=this._coordinates.length, grid = !this.settings.autoWidth, items=this.$stage.children(); if(grid&&cache.items.merge){ while (iterator--){ cache.css.width=this._widths[this.relative(iterator)]; items.eq(iterator).css(cache.css); }}else if(grid){ cache.css.width=cache.items.width; items.css(cache.css); }} }, { filter: [ 'items' ], run: function(){ this._coordinates.length < 1&&this.$stage.removeAttr('style'); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=cache.current ? this.$stage.children().index(cache.current):0; cache.current=Math.max(this.minimum(), Math.min(this.maximum(), cache.current)); this.reset(cache.current); }}, { filter: [ 'position' ], run: function(){ this.animate(this.coordinates(this._current)); }}, { filter: [ 'width', 'position', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, padding=this.settings.stagePadding * 2, begin=this.coordinates(this.current()) + padding, end=begin + this.width() * rtl, inner, outer, matches=[], i, n; for (i=0, n=this._coordinates.length; i < n; i++){ inner=this._coordinates[i - 1]||0; outer=Math.abs(this._coordinates[i]) + padding * rtl; if((this.op(inner, '<=', begin)&&(this.op(inner, '>', end))) || (this.op(outer, '<', begin)&&this.op(outer, '>', end))){ matches.push(i); }} this.$stage.children('.active').removeClass('active'); this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active'); this.$stage.children('.center').removeClass('center'); if(this.settings.center){ this.$stage.children().eq(this.current()).addClass('center'); }} } ]; Owl.prototype.initializeStage=function(){ this.$stage=this.$element.find('.' + this.settings.stageClass); if(this.$stage.length){ return; } this.$element.addClass(this.options.loadingClass); this.$stage=$('<' + this.settings.stageElement + '>', { "class": this.settings.stageClass }).wrap($('
    ', { "class": this.settings.stageOuterClass })); this.$element.append(this.$stage.parent()); }; Owl.prototype.initializeItems=function(){ var $items=this.$element.find('.owl-item'); if($items.length){ this._items=$items.get().map(function(item){ return $(item); }); this._mergers=this._items.map(function(){ return 1; }); this.refresh(); return; } this.replace(this.$element.children().not(this.$stage.parent())); if(this.isVisible()){ this.refresh(); }else{ this.invalidate('width'); } this.$element .removeClass(this.options.loadingClass) .addClass(this.options.loadedClass); }; Owl.prototype.initialize=function(){ this.enter('initializing'); this.trigger('initialize'); this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl); if(this.settings.autoWidth&&!this.is('pre-loading')){ var imgs, nestedSelector, width; imgs=this.$element.find('img'); nestedSelector=this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector:undefined; width=this.$element.children(nestedSelector).width(); if(imgs.length&&width <=0){ this.preloadAutoWidthImages(imgs); }} this.initializeStage(); this.initializeItems(); this.registerEventHandlers(); this.leave('initializing'); this.trigger('initialized'); }; Owl.prototype.isVisible=function(){ return this.settings.checkVisibility ? this.$element.is(':visible') : true; }; Owl.prototype.setup=function(){ var viewport=this.viewport(), overwrites=this.options.responsive, match=-1, settings=null; if(!overwrites){ settings=$.extend({}, this.options); }else{ $.each(overwrites, function(breakpoint){ if(breakpoint <=viewport&&breakpoint > match){ match=Number(breakpoint); }}); settings=$.extend({}, this.options, overwrites[match]); if(typeof settings.stagePadding==='function'){ settings.stagePadding=settings.stagePadding(); } delete settings.responsive; if(settings.responsiveClass){ this.$element.attr('class', this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match) ); }} this.trigger('change', { property: { name: 'settings', value: settings }}); this._breakpoint=match; this.settings=settings; this.invalidate('settings'); this.trigger('changed', { property: { name: 'settings', value: this.settings }}); }; Owl.prototype.optionsLogic=function(){ if(this.settings.autoWidth){ this.settings.stagePadding=false; this.settings.merge=false; }}; Owl.prototype.prepare=function(item){ var event=this.trigger('prepare', { content: item }); if(!event.data){ event.data=$('<' + this.settings.itemElement + '/>') .addClass(this.options.itemClass).append(item) } this.trigger('prepared', { content: event.data }); return event.data; }; Owl.prototype.update=function(){ var i=0, n=this._pipe.length, filter=$.proxy(function(p){ return this[p] }, this._invalidated), cache={}; while (i < n){ if(this._invalidated.all||$.grep(this._pipe[i].filter, filter).length > 0){ this._pipe[i].run(cache); } i++; } this._invalidated={}; !this.is('valid')&&this.enter('valid'); }; Owl.prototype.width=function(dimension){ dimension=dimension||Owl.Width.Default; switch (dimension){ case Owl.Width.Inner: case Owl.Width.Outer: return this._width; default: return this._width - this.settings.stagePadding * 2 + this.settings.margin; }}; Owl.prototype.refresh=function(){ this.enter('refreshing'); this.trigger('refresh'); this.setup(); this.optionsLogic(); this.$element.addClass(this.options.refreshClass); this.update(); this.$element.removeClass(this.options.refreshClass); this.leave('refreshing'); this.trigger('refreshed'); }; Owl.prototype.onThrottledResize=function(){ window.clearTimeout(this.resizeTimer); this.resizeTimer=window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate); }; Owl.prototype.onResize=function(){ if(!this._items.length){ return false; } if(this._width===this.$element.width()){ return false; } if(!this.isVisible()){ return false; } this.enter('resizing'); if(this.trigger('resize').isDefaultPrevented()){ this.leave('resizing'); return false; } this.invalidate('width'); this.refresh(); this.leave('resizing'); this.trigger('resized'); }; Owl.prototype.registerEventHandlers=function(){ if($.support.transition){ this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this)); } if(this.settings.responsive!==false){ this.on(window, 'resize', this._handlers.onThrottledResize); } if(this.settings.mouseDrag){ this.$element.addClass(this.options.dragClass); this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('dragstart.owl.core selectstart.owl.core', function(){ return false }); } if(this.settings.touchDrag){ this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this)); }}; Owl.prototype.onDragStart=function(event){ var stage=null; if(event.which===3){ return; } if($.support.transform){ stage=this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(','); stage={ x: stage[stage.length===16 ? 12:4], y: stage[stage.length===16 ? 13:5] };}else{ stage=this.$stage.position(); stage={ x: this.settings.rtl ? stage.left + this.$stage.width() - this.width() + this.settings.margin : stage.left, y: stage.top };} if(this.is('animating')){ $.support.transform ? this.animate(stage.x):this.$stage.stop() this.invalidate('position'); } this.$element.toggleClass(this.options.grabClass, event.type==='mousedown'); this.speed(0); this._drag.time=new Date().getTime(); this._drag.target=$(event.target); this._drag.stage.start=stage; this._drag.stage.current=stage; this._drag.pointer=this.pointer(event); $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this)); $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)); $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this)); if(Math.abs(delta.x) < Math.abs(delta.y)&&this.is('valid')){ return; } event.preventDefault(); this.enter('dragging'); this.trigger('drag'); }, this)); }; Owl.prototype.onDragMove=function(event){ var minimum=null, maximum=null, pull=null, delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this.difference(this._drag.stage.start, delta); if(!this.is('dragging')){ return; } event.preventDefault(); if(this.settings.loop){ minimum=this.coordinates(this.minimum()); maximum=this.coordinates(this.maximum() + 1) - minimum; stage.x=(((stage.x - minimum) % maximum + maximum) % maximum) + minimum; }else{ minimum=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum()); maximum=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum()); pull=this.settings.pullDrag ? -1 * delta.x / 5:0; stage.x=Math.max(Math.min(stage.x, minimum + pull), maximum + pull); } this._drag.stage.current=stage; this.animate(stage.x); }; Owl.prototype.onDragEnd=function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this._drag.stage.current, direction=delta.x > 0 ^ this.settings.rtl ? 'left':'right'; $(document).off('.owl.core'); this.$element.removeClass(this.options.grabClass); if(delta.x!==0&&this.is('dragging')||!this.is('valid')){ this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed); this.current(this.closest(stage.x, delta.x!==0 ? direction:this._drag.direction)); this.invalidate('position'); this.update(); this._drag.direction=direction; if(Math.abs(delta.x) > 3||new Date().getTime() - this._drag.time > 300){ this._drag.target.one('click.owl.core', function(){ return false; }); }} if(!this.is('dragging')){ return; } this.leave('dragging'); this.trigger('dragged'); }; Owl.prototype.closest=function(coordinate, direction){ var position=-1, pull=30, width=this.width(), coordinates=this.coordinates(); if(!this.settings.freeDrag){ $.each(coordinates, $.proxy(function(index, value){ if(direction==='left'&&coordinate > value - pull&&coordinate < value + pull){ position=index; }else if(direction==='right'&&coordinate > value - width - pull&&coordinate < value - width + pull){ position=index + 1; }else if(this.op(coordinate, '<', value) && this.op(coordinate, '>', coordinates[index + 1]!==undefined ? coordinates[index + 1]:value - width)){ position=direction==='left' ? index + 1:index; } return position===-1; }, this)); } if(!this.settings.loop){ if(this.op(coordinate, '>', coordinates[this.minimum()])){ position=coordinate=this.minimum(); }else if(this.op(coordinate, '<', coordinates[this.maximum()])){ position=coordinate=this.maximum(); }} return position; }; Owl.prototype.animate=function(coordinate){ var animate=this.speed() > 0; this.is('animating')&&this.onTransitionEnd(); if(animate){ this.enter('animating'); this.trigger('translate'); } if($.support.transform3d&&$.support.transition){ this.$stage.css({ transform: 'translate3d(' + coordinate + 'px,0px,0px)', transition: (this.speed() / 1000) + 's' + ( this.settings.slideTransition ? ' ' + this.settings.slideTransition:'' ) }); }else if(animate){ this.$stage.animate({ left: coordinate + 'px' }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)); }else{ this.$stage.css({ left: coordinate + 'px' }); }}; Owl.prototype.is=function(state){ return this._states.current[state]&&this._states.current[state] > 0; }; Owl.prototype.current=function(position){ if(position===undefined){ return this._current; } if(this._items.length===0){ return undefined; } position=this.normalize(position); if(this._current!==position){ var event=this.trigger('change', { property: { name: 'position', value: position }}); if(event.data!==undefined){ position=this.normalize(event.data); } this._current=position; this.invalidate('position'); this.trigger('changed', { property: { name: 'position', value: this._current }}); } return this._current; }; Owl.prototype.invalidate=function(part){ if($.type(part)==='string'){ this._invalidated[part]=true; this.is('valid')&&this.leave('valid'); } return $.map(this._invalidated, function(v, i){ return i }); }; Owl.prototype.reset=function(position){ position=this.normalize(position); if(position===undefined){ return; } this._speed=0; this._current=position; this.suppress([ 'translate', 'translated' ]); this.animate(this.coordinates(position)); this.release([ 'translate', 'translated' ]); }; Owl.prototype.normalize=function(position, relative){ var n=this._items.length, m=relative ? 0:this._clones.length; if(!this.isNumeric(position)||n < 1){ position=undefined; }else if(position < 0||position >=n + m){ position=((position - m / 2) % n + n) % n + m / 2; } return position; }; Owl.prototype.relative=function(position){ position -=this._clones.length / 2; return this.normalize(position, true); }; Owl.prototype.maximum=function(relative){ var settings=this.settings, maximum=this._coordinates.length, iterator, reciprocalItemsWidth, elementWidth; if(settings.loop){ maximum=this._clones.length / 2 + this._items.length - 1; }else if(settings.autoWidth||settings.merge){ iterator=this._items.length; if(iterator){ reciprocalItemsWidth=this._items[--iterator].width(); elementWidth=this.$element.width(); while (iterator--){ reciprocalItemsWidth +=this._items[iterator].width() + this.settings.margin; if(reciprocalItemsWidth > elementWidth){ break; }} } maximum=iterator + 1; }else if(settings.center){ maximum=this._items.length - 1; }else{ maximum=this._items.length - settings.items; } if(relative){ maximum -=this._clones.length / 2; } return Math.max(maximum, 0); }; Owl.prototype.minimum=function(relative){ return relative ? 0:this._clones.length / 2; }; Owl.prototype.items=function(position){ if(position===undefined){ return this._items.slice(); } position=this.normalize(position, true); return this._items[position]; }; Owl.prototype.mergers=function(position){ if(position===undefined){ return this._mergers.slice(); } position=this.normalize(position, true); return this._mergers[position]; }; Owl.prototype.clones=function(position){ var odd=this._clones.length / 2, even=odd + this._items.length, map=function(index){ return index % 2===0 ? even + index / 2:odd - (index + 1) / 2 }; if(position===undefined){ return $.map(this._clones, function(v, i){ return map(i) }); } return $.map(this._clones, function(v, i){ return v===position ? map(i):null }); }; Owl.prototype.speed=function(speed){ if(speed!==undefined){ this._speed=speed; } return this._speed; }; Owl.prototype.coordinates=function(position){ var multiplier=1, newPosition=position - 1, coordinate; if(position===undefined){ return $.map(this._coordinates, $.proxy(function(coordinate, index){ return this.coordinates(index); }, this)); } if(this.settings.center){ if(this.settings.rtl){ multiplier=-1; newPosition=position + 1; } coordinate=this._coordinates[position]; coordinate +=(this.width() - coordinate + (this._coordinates[newPosition]||0)) / 2 * multiplier; }else{ coordinate=this._coordinates[newPosition]||0; } coordinate=Math.ceil(coordinate); return coordinate; }; Owl.prototype.duration=function(from, to, factor){ if(factor===0){ return 0; } return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor||this.settings.smartSpeed)); }; Owl.prototype.to=function(position, speed){ var current=this.current(), revert=null, distance=position - this.relative(current), direction=(distance > 0) - (distance < 0), items=this._items.length, minimum=this.minimum(), maximum=this.maximum(); if(this.settings.loop){ if(!this.settings.rewind&&Math.abs(distance) > items / 2){ distance +=direction * -1 * items; } position=current + distance; revert=((position - minimum) % items + items) % items + minimum; if(revert!==position&&revert - distance <=maximum&&revert - distance > 0){ current=revert - distance; position=revert; this.reset(current); }}else if(this.settings.rewind){ maximum +=1; position=(position % maximum + maximum) % maximum; }else{ position=Math.max(minimum, Math.min(maximum, position)); } this.speed(this.duration(current, position, speed)); this.current(position); if(this.isVisible()){ this.update(); }}; Owl.prototype.next=function(speed){ speed=speed||false; this.to(this.relative(this.current()) + 1, speed); }; Owl.prototype.prev=function(speed){ speed=speed||false; this.to(this.relative(this.current()) - 1, speed); }; Owl.prototype.onTransitionEnd=function(event){ if(event!==undefined){ event.stopPropagation(); if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){ return false; }} this.leave('animating'); this.trigger('translated'); }; Owl.prototype.viewport=function(){ var width; if(this.options.responsiveBaseElement!==window){ width=$(this.options.responsiveBaseElement).width(); }else if(window.innerWidth){ width=window.innerWidth; }else if(document.documentElement&&document.documentElement.clientWidth){ width=document.documentElement.clientWidth; }else{ console.warn('Can not detect viewport width.'); } return width; }; Owl.prototype.replace=function(content){ this.$stage.empty(); this._items=[]; if(content){ content=(content instanceof jQuery) ? content:$(content); } if(this.settings.nestedItemSelector){ content=content.find('.' + this.settings.nestedItemSelector); } content.filter(function(){ return this.nodeType===1; }).each($.proxy(function(index, item){ item=this.prepare(item); this.$stage.append(item); this._items.push(item); this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }, this)); this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0); this.invalidate('items'); }; Owl.prototype.add=function(content, position){ var current=this.relative(this._current); position=position===undefined ? this._items.length:this.normalize(position, true); content=content instanceof jQuery ? content:$(content); this.trigger('add', { content: content, position: position }); content=this.prepare(content); if(this._items.length===0||position===this._items.length){ this._items.length===0&&this.$stage.append(content); this._items.length!==0&&this._items[position - 1].after(content); this._items.push(content); this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }else{ this._items[position].before(content); this._items.splice(position, 0, content); this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); } this._items[current]&&this.reset(this._items[current].index()); this.invalidate('items'); this.trigger('added', { content: content, position: position }); }; Owl.prototype.remove=function(position){ position=this.normalize(position, true); if(position===undefined){ return; } this.trigger('remove', { content: this._items[position], position: position }); this._items[position].remove(); this._items.splice(position, 1); this._mergers.splice(position, 1); this.invalidate('items'); this.trigger('removed', { content: null, position: position }); }; Owl.prototype.preloadAutoWidthImages=function(images){ images.each($.proxy(function(i, element){ this.enter('pre-loading'); element=$(element); $(new Image()).one('load', $.proxy(function(e){ element.attr('src', e.target.src); element.css('opacity', 1); this.leave('pre-loading'); !this.is('pre-loading')&&!this.is('initializing')&&this.refresh(); }, this)).attr('src', element.attr('src')||element.attr('data-src')||element.attr('data-src-retina')); }, this)); }; Owl.prototype.destroy=function(){ this.$element.off('.owl.core'); this.$stage.off('.owl.core'); $(document).off('.owl.core'); if(this.settings.responsive!==false){ window.clearTimeout(this.resizeTimer); this.off(window, 'resize', this._handlers.onThrottledResize); } for (var i in this._plugins){ this._plugins[i].destroy(); } this.$stage.children('.cloned').remove(); this.$stage.unwrap(); this.$stage.children().contents().unwrap(); this.$stage.children().unwrap(); this.$stage.remove(); this.$element .removeClass(this.options.refreshClass) .removeClass(this.options.loadingClass) .removeClass(this.options.loadedClass) .removeClass(this.options.rtlClass) .removeClass(this.options.dragClass) .removeClass(this.options.grabClass) .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), '')) .removeData('owl.carousel'); }; Owl.prototype.op=function(a, o, b){ var rtl=this.settings.rtl; switch (o){ case '<': return rtl ? a > b:a < b; case '>': return rtl ? a < b:a > b; case '>=': return rtl ? a <=b:a >=b; case '<=': return rtl ? a >=b:a <=b; default: break; }}; Owl.prototype.on=function(element, event, listener, capture){ if(element.addEventListener){ element.addEventListener(event, listener, capture); }else if(element.attachEvent){ element.attachEvent('on' + event, listener); }}; Owl.prototype.off=function(element, event, listener, capture){ if(element.removeEventListener){ element.removeEventListener(event, listener, capture); }else if(element.detachEvent){ element.detachEvent('on' + event, listener); }}; Owl.prototype.trigger=function(name, data, namespace, state, enter){ var status={ item: { count: this._items.length, index: this.current() }}, handler=$.camelCase($.grep([ 'on', name, namespace ], function(v){ return v }) .join('-').toLowerCase() ), event=$.Event([ name, 'owl', namespace||'carousel' ].join('.').toLowerCase(), $.extend({ relatedTarget: this }, status, data) ); if(!this._supress[name]){ $.each(this._plugins, function(name, plugin){ if(plugin.onTrigger){ plugin.onTrigger(event); }}); this.register({ type: Owl.Type.Event, name: name }); this.$element.trigger(event); if(this.settings&&typeof this.settings[handler]==='function'){ this.settings[handler].call(this, event); }} return event; }; Owl.prototype.enter=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ if(this._states.current[name]===undefined){ this._states.current[name]=0; } this._states.current[name]++; }, this)); }; Owl.prototype.leave=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ this._states.current[name]--; }, this)); }; Owl.prototype.register=function(object){ if(object.type===Owl.Type.Event){ if(!$.event.special[object.name]){ $.event.special[object.name]={};} if(!$.event.special[object.name].owl){ var _default=$.event.special[object.name]._default; $.event.special[object.name]._default=function(e){ if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){ return _default.apply(this, arguments); } return e.namespace&&e.namespace.indexOf('owl') > -1; }; $.event.special[object.name].owl=true; }}else if(object.type===Owl.Type.State){ if(!this._states.tags[object.name]){ this._states.tags[object.name]=object.tags; }else{ this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags); } this._states.tags[object.name]=$.grep(this._states.tags[object.name], $.proxy(function(tag, i){ return $.inArray(tag, this._states.tags[object.name])===i; }, this)); }}; Owl.prototype.suppress=function(events){ $.each(events, $.proxy(function(index, event){ this._supress[event]=true; }, this)); }; Owl.prototype.release=function(events){ $.each(events, $.proxy(function(index, event){ delete this._supress[event]; }, this)); }; Owl.prototype.pointer=function(event){ var result={ x: null, y: null }; event=event.originalEvent||event||window.event; event=event.touches&&event.touches.length ? event.touches[0]:event.changedTouches&&event.changedTouches.length ? event.changedTouches[0]:event; if(event.pageX){ result.x=event.pageX; result.y=event.pageY; }else{ result.x=event.clientX; result.y=event.clientY; } return result; }; Owl.prototype.isNumeric=function(number){ return !isNaN(parseFloat(number)); }; Owl.prototype.difference=function(first, second){ return { x: first.x - second.x, y: first.y - second.y };}; $.fn.owlCarousel=function(option){ var args=Array.prototype.slice.call(arguments, 1); return this.each(function(){ var $this=$(this), data=$this.data('owl.carousel'); if(!data){ data=new Owl(this, typeof option=='object'&&option); $this.data('owl.carousel', data); $.each([ 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove' ], function(i, event){ data.register({ type: Owl.Type.Event, name: event }); data.$element.on(event + '.owl.carousel.core', $.proxy(function(e){ if(e.namespace&&e.relatedTarget!==this){ this.suppress([ event ]); data[event].apply(this, [].slice.call(arguments, 1)); this.release([ event ]); }}, data)); }); } if(typeof option=='string'&&option.charAt(0)!=='_'){ data[option].apply(data, args); }}); }; $.fn.owlCarousel.Constructor=Owl; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoRefresh=function(carousel){ this._core=carousel; this._interval=null; this._visible=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoRefresh){ this.watch(); }}, this) }; this._core.options=$.extend({}, AutoRefresh.Defaults, this._core.options); this._core.$element.on(this._handlers); }; AutoRefresh.Defaults={ autoRefresh: true, autoRefreshInterval: 500 }; AutoRefresh.prototype.watch=function(){ if(this._interval){ return; } this._visible=this._core.isVisible(); this._interval=window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval); }; AutoRefresh.prototype.refresh=function(){ if(this._core.isVisible()===this._visible){ return; } this._visible = !this._visible; this._core.$element.toggleClass('owl-hidden', !this._visible); this._visible&&(this._core.invalidate('width')&&this._core.refresh()); }; AutoRefresh.prototype.destroy=function(){ var handler, property; window.clearInterval(this._interval); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Lazy=function(carousel){ this._core=carousel; this._loaded=[]; this._handlers={ 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } if(!this._core.settings||!this._core.settings.lazyLoad){ return; } if((e.property&&e.property.name=='position')||e.type=='initialized'){ var settings=this._core.settings, n=(settings.center&&Math.ceil(settings.items / 2)||settings.items), i=((settings.center&&n * -1)||0), position=(e.property&&e.property.value!==undefined ? e.property.value:this._core.current()) + i, clones=this._core.clones().length, load=$.proxy(function(i, v){ this.load(v) }, this); if(settings.lazyLoadEager > 0){ n +=settings.lazyLoadEager; if(settings.loop){ position -=settings.lazyLoadEager; n++; }} while (i++ < n){ this.load(clones / 2 + this._core.relative(position)); clones&&$.each(this._core.clones(this._core.relative(position)), load); position++; }} }, this) }; this._core.options=$.extend({}, Lazy.Defaults, this._core.options); this._core.$element.on(this._handlers); }; Lazy.Defaults={ lazyLoad: false, lazyLoadEager: 0 }; Lazy.prototype.load=function(position){ var $item=this._core.$stage.children().eq(position), $elements=$item&&$item.find('.owl-lazy'); if(!$elements||$.inArray($item.get(0), this._loaded) > -1){ return; } $elements.each($.proxy(function(index, element){ var $element=$(element), image, url=(window.devicePixelRatio > 1&&$element.attr('data-src-retina'))||$element.attr('data-src')||$element.attr('data-srcset'); this._core.trigger('load', { element: $element, url: url }, 'lazy'); if($element.is('img')){ $element.one('load.owl.lazy', $.proxy(function(){ $element.addClass('owl-lazy-loaded'); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('src', url); }else if($element.is('source')){ $element.one('load.owl.lazy', $.proxy(function(){ this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('srcset', url); }else{ image=new Image(); image.onload=$.proxy(function(){ $element.css({ 'background-image': 'url("' + url + '")', 'opacity': '1' }); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this); image.src=url; }}, this)); this._loaded.push($item.get(0)); }; Lazy.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this._core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoHeight=function(carousel){ this._core=carousel; this._previousHeight=null; this._handlers={ 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight){ this.update(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight&&e.property.name==='position'){ this.update(); }}, this), 'loaded.owl.lazy': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass).index()===this._core.current()){ this.update(); }}, this) }; this._core.options=$.extend({}, AutoHeight.Defaults, this._core.options); this._core.$element.on(this._handlers); this._intervalId=null; var refThis=this; $(window).on('load', function(){ if(refThis._core.settings.autoHeight){ refThis.update(); }}); $(window).resize(function(){ if(refThis._core.settings.autoHeight){ if(refThis._intervalId!=null){ clearTimeout(refThis._intervalId); } refThis._intervalId=setTimeout(function(){ refThis.update(); }, 250); }}); }; AutoHeight.Defaults={ autoHeight: false, autoHeightClass: 'owl-height' }; AutoHeight.prototype.update=function(){ var start=this._core._current, end=start + this._core.settings.items, lazyLoadEnabled=this._core.settings.lazyLoad, visible=this._core.$stage.children().toArray().slice(start, end), heights=[], maxheight=0; $.each(visible, function(index, item){ heights.push($(item).height()); }); maxheight=Math.max.apply(null, heights); if(maxheight <=1&&lazyLoadEnabled&&this._previousHeight){ maxheight=this._previousHeight; } this._previousHeight=maxheight; this._core.$stage.parent() .height(maxheight) .addClass(this._core.settings.autoHeightClass); }; AutoHeight.prototype.destroy=function(){ var handler, property; for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!=='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Video=function(carousel){ this._core=carousel; this._videos={}; this._playing=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace){ this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] }); }}, this), 'resize.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){ e.preventDefault(); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.is('resizing')){ this._core.$stage.find('.cloned .owl-video-frame').remove(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='position'&&this._playing){ this.stop(); }}, this), 'prepared.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } var $element=$(e.content).find('.owl-video'); if($element.length){ $element.css('display', 'none'); this.fetch($element, $(e.content)); }}, this) }; this._core.options=$.extend({}, Video.Defaults, this._core.options); this._core.$element.on(this._handlers); this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e){ this.play(e); }, this)); }; Video.Defaults={ video: false, videoHeight: false, videoWidth: false }; Video.prototype.fetch=function(target, item){ var type=(function(){ if(target.attr('data-vimeo-id')){ return 'vimeo'; }else if(target.attr('data-vzaar-id')){ return 'vzaar' }else{ return 'youtube'; }})(), id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'), width=target.attr('data-width')||this._core.settings.videoWidth, height=target.attr('data-height')||this._core.settings.videoHeight, url=target.attr('href'); if(url){ id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); if(id[3].indexOf('youtu') > -1){ type='youtube'; }else if(id[3].indexOf('vimeo') > -1){ type='vimeo'; }else if(id[3].indexOf('vzaar') > -1){ type='vzaar'; }else{ throw new Error('Video URL not supported.'); } id=id[6]; }else{ throw new Error('Missing video URL.'); } this._videos[url]={ type: type, id: id, width: width, height: height }; item.attr('data-video', url); this.thumbnail(target, this._videos[url]); }; Video.prototype.thumbnail=function(target, video){ var tnLink, icon, path, dimensions=video.width&&video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;':'', customTn=target.find('img'), srcType='src', lazyClass='', settings=this._core.settings, create=function(path){ icon='
    '; if(settings.lazyLoad){ tnLink=$('
    ',{ "class": 'owl-video-tn ' + lazyClass, "srcType": path }); }else{ tnLink=$('
    ', { "class": "owl-video-tn", "style": 'opacity:1;background-image:url(' + path + ')' }); } target.after(tnLink); target.after(icon); }; target.wrap($('
    ', { "class": "owl-video-wrapper", "style": dimensions })); if(this._core.settings.lazyLoad){ srcType='data-src'; lazyClass='owl-lazy'; } if(customTn.length){ create(customTn.attr(srcType)); customTn.remove(); return false; } if(video.type==='youtube'){ path="//img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; create(path); }else if(video.type==='vimeo'){ $.ajax({ type: 'GET', url: '//vimeo.com/api/v2/video/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data[0].thumbnail_large; create(path); }}); }else if(video.type==='vzaar'){ $.ajax({ type: 'GET', url: '//vzaar.com/api/videos/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data.framegrab_url; create(path); }}); }}; Video.prototype.stop=function(){ this._core.trigger('stop', null, 'video'); this._playing.find('.owl-video-frame').remove(); this._playing.removeClass('owl-video-playing'); this._playing=null; this._core.leave('playing'); this._core.trigger('stopped', null, 'video'); }; Video.prototype.play=function(event){ var target=$(event.target), item=target.closest('.' + this._core.settings.itemClass), video=this._videos[item.attr('data-video')], width=video.width||'100%', height=video.height||this._core.$stage.height(), html, iframe; if(this._playing){ return; } this._core.enter('playing'); this._core.trigger('play', null, 'video'); item=this._core.items(this._core.relative(item.index())); this._core.reset(item.index()); html=$(''); html.attr('height', height); html.attr('width', width); if(video.type==='youtube'){ html.attr('src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id); }else if(video.type==='vimeo'){ html.attr('src', '//player.vimeo.com/video/' + video.id + '?autoplay=1'); }else if(video.type==='vzaar'){ html.attr('src', '//view.vzaar.com/' + video.id + '/player?autoplay=true'); } iframe=$(html).wrap('
    ').insertAfter(item.find('.owl-video')); this._playing=item.addClass('owl-video-playing'); }; Video.prototype.isInFullScreen=function(){ var element=document.fullscreenElement||document.mozFullScreenElement || document.webkitFullscreenElement; return element&&$(element).parent().hasClass('owl-video-frame'); }; Video.prototype.destroy=function(){ var handler, property; this._core.$element.off('click.owl.video'); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Video=Video; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Animate=function(scope){ this.core=scope; this.core.options=$.extend({}, Animate.Defaults, this.core.options); this.swapping=true; this.previous=undefined; this.next=undefined; this.handlers={ 'change.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.previous=this.core.current(); this.next=e.property.value; }}, this), 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e){ if(e.namespace){ this.swapping=e.type=='translated'; }}, this), 'translate.owl.carousel': $.proxy(function(e){ if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){ this.swap(); }}, this) }; this.core.$element.on(this.handlers); }; Animate.Defaults={ animateOut: false, animateIn: false }; Animate.prototype.swap=function(){ if(this.core.settings.items!==1){ return; } if(!$.support.animation||!$.support.transition){ return; } this.core.speed(0); var left, clear=$.proxy(this.clear, this), previous=this.core.$stage.children().eq(this.previous), next=this.core.$stage.children().eq(this.next), incoming=this.core.settings.animateIn, outgoing=this.core.settings.animateOut; if(this.core.current()===this.previous){ return; } if(outgoing){ left=this.core.coordinates(this.previous) - this.core.coordinates(this.next); previous.one($.support.animation.end, clear) .css({ 'left': left + 'px' }) .addClass('animated owl-animated-out') .addClass(outgoing); } if(incoming){ next.one($.support.animation.end, clear) .addClass('animated owl-animated-in') .addClass(incoming); }}; Animate.prototype.clear=function(e){ $(e.target).css({ 'left': '' }) .removeClass('animated owl-animated-out owl-animated-in') .removeClass(this.core.settings.animateIn) .removeClass(this.core.settings.animateOut); this.core.onTransitionEnd(); }; Animate.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this.core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Animate=Animate; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Autoplay=function(carousel){ this._core=carousel; this._call=null; this._time=0; this._timeout=0; this._paused=true; this._handlers={ 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='settings'){ if(this._core.settings.autoplay){ this.play(); }else{ this.stop(); }}else if(e.namespace&&e.property.name==='position'&&this._paused){ this._time=0; }}, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoplay){ this.play(); }}, this), 'play.owl.autoplay': $.proxy(function(e, t, s){ if(e.namespace){ this.play(t, s); }}, this), 'stop.owl.autoplay': $.proxy(function(e){ if(e.namespace){ this.stop(); }}, this), 'mouseover.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'mouseleave.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.play(); }}, this), 'touchstart.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'touchend.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause){ this.play(); }}, this) }; this._core.$element.on(this._handlers); this._core.options=$.extend({}, Autoplay.Defaults, this._core.options); }; Autoplay.Defaults={ autoplay: false, autoplayTimeout: 5000, autoplayHoverPause: false, autoplaySpeed: false }; Autoplay.prototype._next=function(speed){ this._call=window.setTimeout($.proxy(this._next, this, speed), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read() ); if(this._core.is('interacting')||document.hidden){ return; } this._core.next(speed||this._core.settings.autoplaySpeed); } Autoplay.prototype.read=function(){ return new Date().getTime() - this._time; }; Autoplay.prototype.play=function(timeout, speed){ var elapsed; if(!this._core.is('rotating')){ this._core.enter('rotating'); } timeout=timeout||this._core.settings.autoplayTimeout; elapsed=Math.min(this._time % (this._timeout||timeout), timeout); if(this._paused){ this._time=this.read(); this._paused=false; }else{ window.clearTimeout(this._call); } this._time +=this.read() % timeout - elapsed; this._timeout=timeout; this._call=window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed); }; Autoplay.prototype.stop=function(){ if(this._core.is('rotating')){ this._time=0; this._paused=true; window.clearTimeout(this._call); this._core.leave('rotating'); }}; Autoplay.prototype.pause=function(){ if(this._core.is('rotating')&&!this._paused){ this._time=this.read(); this._paused=true; window.clearTimeout(this._call); }}; Autoplay.prototype.destroy=function(){ var handler, property; this.stop(); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ 'use strict'; var Navigation=function(carousel){ this._core=carousel; this._initialized=false; this._pages=[]; this._controls={}; this._templates=[]; this.$element=this._core.$element; this._overrides={ next: this._core.next, prev: this._core.prev, to: this._core.to }; this._handlers={ 'prepared.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.push('
    ' + $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
    '); }}, this), 'added.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 0, this._templates.pop()); }}, this), 'remove.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 1); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.draw(); }}, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&!this._initialized){ this._core.trigger('initialize', null, 'navigation'); this.initialize(); this.update(); this.draw(); this._initialized=true; this._core.trigger('initialized', null, 'navigation'); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._initialized){ this._core.trigger('refresh', null, 'navigation'); this.update(); this.draw(); this._core.trigger('refreshed', null, 'navigation'); }}, this) }; this._core.options=$.extend({}, Navigation.Defaults, this._core.options); this.$element.on(this._handlers); }; Navigation.Defaults={ nav: false, navText: [ '', '' ], navSpeed: false, navElement: 'button type="button" role="presentation"', navContainer: false, navContainerClass: 'owl-nav', navClass: [ 'owl-prev', 'owl-next' ], slideBy: 1, dotClass: 'owl-dot', dotsClass: 'owl-dots', dots: true, dotsEach: false, dotsData: false, dotsSpeed: false, dotsContainer: false }; Navigation.prototype.initialize=function(){ var override, settings=this._core.settings; this._controls.$relative=(settings.navContainer ? $(settings.navContainer) : $('
    ').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); this._controls.$previous=$('<' + settings.navElement + '>') .addClass(settings.navClass[0]) .html(settings.navText[0]) .prependTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.prev(settings.navSpeed); }, this)); this._controls.$next=$('<' + settings.navElement + '>') .addClass(settings.navClass[1]) .html(settings.navText[1]) .appendTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.next(settings.navSpeed); }, this)); if(!settings.dotsData){ this._templates=[ $('', tClose: 'Close (Esc)', tLoading: 'Loading...', autoFocusLast: true }}; $.fn.magnificPopup=function(options){ _checkInstance(); var jqEl=$(this); if(typeof options==="string"){ if(options==='open'){ var items, itemOpts=_isJQ ? jqEl.data('magnificPopup'):jqEl[0].magnificPopup, index=parseInt(arguments[1], 10)||0; if(itemOpts.items){ items=itemOpts.items[index]; }else{ items=jqEl; if(itemOpts.delegate){ items=items.find(itemOpts.delegate); } items=items.eq(index); } mfp._openClick({mfpEl:items}, jqEl, itemOpts); }else{ if(mfp.isOpen) mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); }}else{ options=$.extend(true, {}, options); if(_isJQ){ jqEl.data('magnificPopup', options); }else{ jqEl[0].magnificPopup=options; } mfp.addGroup(jqEl, options); } return jqEl; }; var INLINE_NS='inline', _hiddenClass, _inlinePlaceholder, _lastInlineElement, _putInlineElementsBack=function(){ if(_lastInlineElement){ _inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach(); _lastInlineElement=null; }}; $.magnificPopup.registerModule(INLINE_NS, { options: { hiddenClass: 'hide', markup: '', tNotFound: 'Content not found' }, proto: { initInline: function(){ mfp.types.push(INLINE_NS); _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function(){ _putInlineElementsBack(); }); }, getInline: function(item, template){ _putInlineElementsBack(); if(item.src){ var inlineSt=mfp.st.inline, el=$(item.src); if(el.length){ var parent=el[0].parentNode; if(parent&&parent.tagName){ if(!_inlinePlaceholder){ _hiddenClass=inlineSt.hiddenClass; _inlinePlaceholder=_getEl(_hiddenClass); _hiddenClass='mfp-'+_hiddenClass; } _lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); } mfp.updateStatus('ready'); }else{ mfp.updateStatus('error', inlineSt.tNotFound); el=$('
    '); } item.inlineElement=el; return el; } mfp.updateStatus('ready'); mfp._parseMarkup(template, {}, item); return template; }} }); var AJAX_NS='ajax', _ajaxCur, _removeAjaxCursor=function(){ if(_ajaxCur){ $(document.body).removeClass(_ajaxCur); }}, _destroyAjaxRequest=function(){ _removeAjaxCursor(); if(mfp.req){ mfp.req.abort(); }}; $.magnificPopup.registerModule(AJAX_NS, { options: { settings: null, cursor: 'mfp-ajax-cur', tError: 'The content could not be loaded.' }, proto: { initAjax: function(){ mfp.types.push(AJAX_NS); _ajaxCur=mfp.st.ajax.cursor; _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); }, getAjax: function(item){ if(_ajaxCur){ $(document.body).addClass(_ajaxCur); } mfp.updateStatus('loading'); var opts=$.extend({ url: item.src, success: function(data, textStatus, jqXHR){ var temp={ data:data, xhr:jqXHR }; _mfpTrigger('ParseAjax', temp); mfp.appendContent($(temp.data), AJAX_NS); item.finished=true; _removeAjaxCursor(); mfp._setFocus(); setTimeout(function(){ mfp.wrap.addClass(READY_CLASS); }, 16); mfp.updateStatus('ready'); _mfpTrigger('AjaxContentAdded'); }, error: function(){ _removeAjaxCursor(); item.finished=item.loadError=true; mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); }}, mfp.st.ajax.settings); mfp.req=$.ajax(opts); return ''; }} }); var _imgInterval, _getTitle=function(item){ if(item.data&&item.data.title!==undefined) return item.data.title; var src=mfp.st.image.titleSrc; if(src){ if($.isFunction(src)){ return src.call(mfp, item); }else if(item.el){ return item.el.attr(src)||''; }} return ''; }; $.magnificPopup.registerModule('image', { options: { markup: '
    '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    '+ '
    ', cursor: 'mfp-zoom-out-cur', titleSrc: 'title', verticalFit: true, tError: '
    The image could not be loaded.' }, proto: { initImage: function(){ var imgSt=mfp.st.image, ns='.image'; mfp.types.push('image'); _mfpOn(OPEN_EVENT+ns, function(){ if(mfp.currItem.type==='image'&&imgSt.cursor){ $(document.body).addClass(imgSt.cursor); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(imgSt.cursor){ $(document.body).removeClass(imgSt.cursor); } _window.off('resize' + EVENT_NS); }); _mfpOn('Resize'+ns, mfp.resizeImage); if(mfp.isLowIE){ _mfpOn('AfterChange', mfp.resizeImage); }}, resizeImage: function(){ var item=mfp.currItem; if(!item||!item.img) return; if(mfp.st.image.verticalFit){ var decr=0; if(mfp.isLowIE){ decr=parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); } item.img.css('max-height', mfp.wH-decr); }}, _onImageHasSize: function(item){ if(item.img){ item.hasSize=true; if(_imgInterval){ clearInterval(_imgInterval); } item.isCheckingImgSize=false; _mfpTrigger('ImageHasSize', item); if(item.imgHidden){ if(mfp.content) mfp.content.removeClass('mfp-loading'); item.imgHidden=false; }} }, findImageSize: function(item){ var counter=0, img=item.img[0], mfpSetInterval=function(delay){ if(_imgInterval){ clearInterval(_imgInterval); } _imgInterval=setInterval(function(){ if(img.naturalWidth > 0){ mfp._onImageHasSize(item); return; } if(counter > 200){ clearInterval(_imgInterval); } counter++; if(counter===3){ mfpSetInterval(10); }else if(counter===40){ mfpSetInterval(50); }else if(counter===100){ mfpSetInterval(500); }}, delay); }; mfpSetInterval(1); }, getImage: function(item, template){ var guard=0, onLoadComplete=function(){ if(item){ if(item.img[0].complete){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('ready'); } item.hasSize=true; item.loaded=true; _mfpTrigger('ImageLoadComplete'); }else{ guard++; if(guard < 200){ setTimeout(onLoadComplete,100); }else{ onLoadError(); }} }}, onLoadError=function(){ if(item){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); } item.hasSize=true; item.loaded=true; item.loadError=true; }}, imgSt=mfp.st.image; var el=template.find('.mfp-img'); if(el.length){ var img=document.createElement('img'); img.className='mfp-img'; if(item.el&&item.el.find('img').length){ img.alt=item.el.find('img').attr('alt'); } item.img=$(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); img.src=item.src; if(el.is('img')){ item.img=item.img.clone(); } img=item.img[0]; if(img.naturalWidth > 0){ item.hasSize=true; }else if(!img.width){ item.hasSize=false; }} mfp._parseMarkup(template, { title: _getTitle(item), img_replaceWith: item.img }, item); mfp.resizeImage(); if(item.hasSize){ if(_imgInterval) clearInterval(_imgInterval); if(item.loadError){ template.addClass('mfp-loading'); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); }else{ template.removeClass('mfp-loading'); mfp.updateStatus('ready'); } return template; } mfp.updateStatus('loading'); item.loading=true; if(!item.hasSize){ item.imgHidden=true; template.addClass('mfp-loading'); mfp.findImageSize(item); } return template; }} }); var hasMozTransform, getHasMozTransform=function(){ if(hasMozTransform===undefined){ hasMozTransform=document.createElement('p').style.MozTransform!==undefined; } return hasMozTransform; }; $.magnificPopup.registerModule('zoom', { options: { enabled: false, easing: 'ease-in-out', duration: 300, opener: function(element){ return element.is('img') ? element:element.find('img'); }}, proto: { initZoom: function(){ var zoomSt=mfp.st.zoom, ns='.zoom', image; if(!zoomSt.enabled||!mfp.supportsTransition){ return; } var duration=zoomSt.duration, getElToAnimate=function(image){ var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), transition='all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, cssObj={ position: 'fixed', zIndex: 9999, left: 0, top: 0, '-webkit-backface-visibility': 'hidden' }, t='transition'; cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition; newImg.css(cssObj); return newImg; }, showMainContent=function(){ mfp.content.css('visibility', 'visible'); }, openTimeout, animatedImg; _mfpOn('BuildControls'+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.content.css('visibility', 'hidden'); image=mfp._getItemToZoom(); if(!image){ showMainContent(); return; } animatedImg=getElToAnimate(image); animatedImg.css(mfp._getOffset()); mfp.wrap.append(animatedImg); openTimeout=setTimeout(function(){ animatedImg.css(mfp._getOffset(true)); openTimeout=setTimeout(function(){ showMainContent(); setTimeout(function(){ animatedImg.remove(); image=animatedImg=null; _mfpTrigger('ZoomAnimationEnded'); }, 16); }, duration); }, 16); }}); _mfpOn(BEFORE_CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.st.removalDelay=duration; if(!image){ image=mfp._getItemToZoom(); if(!image){ return; } animatedImg=getElToAnimate(image); } animatedImg.css(mfp._getOffset(true)); mfp.wrap.append(animatedImg); mfp.content.css('visibility', 'hidden'); setTimeout(function(){ animatedImg.css(mfp._getOffset()); }, 16); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ showMainContent(); if(animatedImg){ animatedImg.remove(); } image=null; }}); }, _allowZoom: function(){ return mfp.currItem.type==='image'; }, _getItemToZoom: function(){ if(mfp.currItem.hasSize){ return mfp.currItem.img; }else{ return false; }}, _getOffset: function(isLarge){ var el; if(isLarge){ el=mfp.currItem.img; }else{ el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem); } var offset=el.offset(); var paddingTop=parseInt(el.css('padding-top'),10); var paddingBottom=parseInt(el.css('padding-bottom'),10); offset.top -=($(window).scrollTop() - paddingTop); var obj={ width: el.width(), height: (_isJQ ? el.innerHeight():el[0].offsetHeight) - paddingBottom - paddingTop }; if(getHasMozTransform()){ obj['-moz-transform']=obj['transform']='translate(' + offset.left + 'px,' + offset.top + 'px)'; }else{ obj.left=offset.left; obj.top=offset.top; } return obj; }} }); var IFRAME_NS='iframe', _emptyPage='//about:blank', _fixIframeBugs=function(isShowing){ if(mfp.currTemplate[IFRAME_NS]){ var el=mfp.currTemplate[IFRAME_NS].find('iframe'); if(el.length){ if(!isShowing){ el[0].src=_emptyPage; } if(mfp.isIE8){ el.css('display', isShowing ? 'block':'none'); }} }}; $.magnificPopup.registerModule(IFRAME_NS, { options: { markup: '
    '+ '
    '+ ''+ '
    ', srcAction: 'iframe_src', patterns: { youtube: { index: 'youtube.com', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' }, vimeo: { index: 'vimeo.com/', id: '/', src: '//player.vimeo.com/video/%id%?autoplay=1' }, gmaps: { index: '//maps.google.', src: '%id%&output=embed' }} }, proto: { initIframe: function(){ mfp.types.push(IFRAME_NS); _mfpOn('BeforeChange', function(e, prevType, newType){ if(prevType!==newType){ if(prevType===IFRAME_NS){ _fixIframeBugs(); }else if(newType===IFRAME_NS){ _fixIframeBugs(true); }} }); _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function(){ _fixIframeBugs(); }); }, getIframe: function(item, template){ var embedSrc=item.src; var iframeSt=mfp.st.iframe; $.each(iframeSt.patterns, function(){ if(embedSrc.indexOf(this.index) > -1){ if(this.id){ if(typeof this.id==='string'){ embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); }else{ embedSrc=this.id.call(this, embedSrc); }} embedSrc=this.src.replace('%id%', embedSrc); return false; }}); var dataObj={}; if(iframeSt.srcAction){ dataObj[iframeSt.srcAction]=embedSrc; } mfp._parseMarkup(template, dataObj, item); mfp.updateStatus('ready'); return template; }} }); var _getLoopedId=function(index){ var numSlides=mfp.items.length; if(index > numSlides - 1){ return index - numSlides; }else if(index < 0){ return numSlides + index; } return index; }, _replaceCurrTotal=function(text, curr, total){ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); }; $.magnificPopup.registerModule('gallery', { options: { enabled: false, arrowMarkup: '', preload: [0,2], navigateByImgClick: true, arrows: true, tPrev: 'Previous (Left arrow key)', tNext: 'Next (Right arrow key)', tCounter: '%curr% of %total%' }, proto: { initGallery: function(){ var gSt=mfp.st.gallery, ns='.mfp-gallery'; mfp.direction=true; if(!gSt||!gSt.enabled) return false; _wrapClasses +=' mfp-gallery'; _mfpOn(OPEN_EVENT+ns, function(){ if(gSt.navigateByImgClick){ mfp.wrap.on('click'+ns, '.mfp-img', function(){ if(mfp.items.length > 1){ mfp.next(); return false; }}); } _document.on('keydown'+ns, function(e){ if(e.keyCode===37){ mfp.prev(); }else if(e.keyCode===39){ mfp.next(); }}); }); _mfpOn('UpdateStatus'+ns, function(e, data){ if(data.text){ data.text=_replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); }}); _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item){ var l=mfp.items.length; values.counter=l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l):''; }); _mfpOn('BuildControls' + ns, function(){ if(mfp.items.length > 1&&gSt.arrows&&!mfp.arrowLeft){ var markup=gSt.arrowMarkup, arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS), arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS); arrowLeft.click(function(){ mfp.prev(); }); arrowRight.click(function(){ mfp.next(); }); mfp.container.append(arrowLeft.add(arrowRight)); }}); _mfpOn(CHANGE_EVENT+ns, function(){ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); mfp._preloadTimeout=setTimeout(function(){ mfp.preloadNearbyImages(); mfp._preloadTimeout=null; }, 16); }); _mfpOn(CLOSE_EVENT+ns, function(){ _document.off(ns); mfp.wrap.off('click'+ns); mfp.arrowRight=mfp.arrowLeft=null; }); }, next: function(){ mfp.direction=true; mfp.index=_getLoopedId(mfp.index + 1); mfp.updateItemHTML(); }, prev: function(){ mfp.direction=false; mfp.index=_getLoopedId(mfp.index - 1); mfp.updateItemHTML(); }, goTo: function(newIndex){ mfp.direction=(newIndex >=mfp.index); mfp.index=newIndex; mfp.updateItemHTML(); }, preloadNearbyImages: function(){ var p=mfp.st.gallery.preload, preloadBefore=Math.min(p[0], mfp.items.length), preloadAfter=Math.min(p[1], mfp.items.length), i; for(i=1; i <=(mfp.direction ? preloadAfter:preloadBefore); i++){ mfp._preloadItem(mfp.index+i); } for(i=1; i <=(mfp.direction ? preloadBefore:preloadAfter); i++){ mfp._preloadItem(mfp.index-i); }}, _preloadItem: function(index){ index=_getLoopedId(index); if(mfp.items[index].preloaded){ return; } var item=mfp.items[index]; if(!item.parsed){ item=mfp.parseEl(index); } _mfpTrigger('LazyLoad', item); if(item.type==='image'){ item.img=$('').on('load.mfploader', function(){ item.hasSize=true; }).on('error.mfploader', function(){ item.hasSize=true; item.loadError=true; _mfpTrigger('LazyLoadError', item); }).attr('src', item.src); } item.preloaded=true; }} }); var RETINA_NS='retina'; $.magnificPopup.registerModule(RETINA_NS, { options: { replaceSrc: function(item){ return item.src.replace(/\.\w+$/, function(m){ return '@2x' + m; }); }, ratio: 1 }, proto: { initRetina: function(){ if(window.devicePixelRatio > 1){ var st=mfp.st.retina, ratio=st.ratio; ratio = !isNaN(ratio) ? ratio:ratio(); if(ratio > 1){ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item){ item.img.css({ 'max-width': item.img[0].naturalWidth / ratio, 'width': '100%' }); }); _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item){ item.src=st.replaceSrc(item, ratio); }); }} }} }); _checkInstance(); })); (function(factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof module==='object'&&module.exports){ module.exports=function(root, jQuery){ if(jQuery===undefined){ if(typeof window!=='undefined'){ jQuery=require('jquery'); }else{ jQuery=require('jquery')(root); }} factory(jQuery); return jQuery; };}else{ factory(jQuery); }}(function($){ 'use strict'; var pluginName='selectric', classList='Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll Group GroupLabel', bindSufix='.sl', defaults={ onChange: function(elm){ $(elm).change(); }, maxHeight: 300, keySearchTimeout: 500, arrowButtonMarkup: '', disableOnMobile: true, openOnHover: false, hoverIntentTimeout: 500, expandToItemText: false, responsive: false, preventWindowScroll: true, inheritOriginalWidth: false, allowWrap: true, customClass: { prefix: pluginName, camelCase: false }, optionsItemBuilder: '{text}', labelBuilder: '{text}' }, hooks={ add: function(callbackName, hookName, fn){ if(!this[callbackName]) this[callbackName]={}; this[callbackName][hookName]=fn; }, remove: function(callbackName, hookName){ delete this[callbackName][hookName]; }}, _utils={ replaceDiacritics: function(s){ var d='40-46 50-53 54-57 62-70 71-74 61 47 77'.replace(/\d+/g, '\\3$&').split(' '), k=d.length; while (k--) s=s.toLowerCase().replace(RegExp('[' + d[k] + ']', 'g'), 'aeiouncy'.charAt(k)); return s; }, format: function(f){var a=arguments;return(""+f).replace(/{(\d+|(\w+))}/g,function(s,i,p){return p&&a[1]?a[1][p]:a[i]})}, nextEnabledItem: function(selectItems, selected){ while(selectItems[ selected=(selected + 1) % selectItems.length ].disabled){} return selected; }, previousEnabledItem: function(selectItems, selected){ while(selectItems[ selected=(selected > 0 ? selected:selectItems.length) - 1 ].disabled){} return selected; }, toDash: function(str){ return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); }, triggerCallback: function(fn, scope){ var elm=scope.element, func=scope.options['on' + fn]; if($.isFunction(func)) func.call(elm, elm, scope); if(hooks[fn]){ $.each(hooks[fn], function(){ this.call(elm, elm, scope); }); } $(elm).trigger(pluginName + '-' + _utils.toDash(fn), scope); }}, $doc=$(document), $win=$(window), Selectric=function(element, opts){ var _this=this, $original=$(element), $input, $items, $itemsScroll, $wrapper, $label, $outerWrapper, $li, isOpen=false, isEnabled=false, selected, currValue, itemsHeight, itemsInnerHeight, finalWidth, optionsLength, eventTriggers, isMobile=/android|ip(hone|od|ad)/i.test(navigator.userAgent), tabindex=$original.prop('tabindex'), labelBuilder; function _init(opts){ _this.options=$.extend(true, {}, defaults, _this.options, opts); _this.classes={}; _this.element=element; _utils.triggerCallback('BeforeInit', _this); if(_this.options.disableOnMobile&&isMobile){ _this.disableOnMobile=true; return; } _destroy(true); var customClass=_this.options.customClass, postfixes=classList.split(' '), originalWidth=$original.width(); $.each(postfixes, function(i, currClass){ var c=customClass.prefix + currClass; _this.classes[currClass.toLowerCase()]=customClass.camelCase ? c:_utils.toDash(c); }); $input=$('', { 'class': _this.classes.input, 'readonly': isMobile }); $items=$('
    ', { 'class': _this.classes.items, 'tabindex': -1 }); $itemsScroll=$('
    ', { 'class': _this.classes.scroll }); $wrapper=$('
    ', { 'class': customClass.prefix, 'html': _this.options.arrowButtonMarkup }); $label=$('

    '); $outerWrapper=$original.wrap('

    ').parent().append($wrapper.prepend($label), $items, $input); eventTriggers={ open:_open, close:_close, destroy:_destroy, refresh:_refresh, init:_init }; $original.on(eventTriggers).wrap('
    '); $.extend(_this, eventTriggers); labelBuilder=_this.options.labelBuilder; if(_this.options.inheritOriginalWidth&&originalWidth > 0) $outerWrapper.width(originalWidth); _populate(); } function _populate(){ _this.items=[]; var $options=$original.children(), _$li='
      ', $justOptions=$original.find('option'), selectedIndex=$justOptions.index($justOptions.filter(':selected')), currIndex=0; currValue=(selected=~selectedIndex ? selectedIndex:0); if(optionsLength=$options.length){ $options.each(function(){ var $elm=$(this); if($elm.is('optgroup')){ var groupDisabled=$elm.prop('disabled'), $children=$elm.children(); _$li +=_utils.format('
      • {3}
      • ', $.trim([_this.classes.group, groupDisabled ? 'disabled':'', $elm.prop('class')].join(' ')), _this.classes.grouplabel, $elm.prop('label') ); if(groupDisabled){ $children.prop('disabled', true); } $children.each(buildOption); _$li +='
      '; }else{ buildOption.call($elm); } function buildOption(){ var $elm=$(this), optionText=$elm.html(), selectDisabled=$elm.prop('disabled'), itemBuilder=_this.options.optionsItemBuilder; _this.items[currIndex]={ element:$elm, value:$elm.val(), text:optionText, slug:_utils.replaceDiacritics(optionText), disabled:selectDisabled }; _$li +=_utils.format('
    • {3}
    • ', currIndex, $.trim([currIndex==currValue ? 'selected':'', currIndex==optionsLength - 1 ? 'last':'', selectDisabled ? 'disabled':''].join(' ')), $.isFunction(itemBuilder) ? itemBuilder(_this.items[currIndex], $elm, currIndex):_utils.format(itemBuilder, _this.items[currIndex]) ); currIndex++; }}); $items.append($itemsScroll.html(_$li + '
    ')); $label.html($.isFunction(labelBuilder) ? labelBuilder(_this.items[currValue]):_utils.format(labelBuilder, _this.items[currValue]) ) } $wrapper.add($original).add($outerWrapper).add($input).off(bindSufix); $outerWrapper.prop('class', [ _this.classes.wrapper, $original.prop('class').replace(/\S+/g, _this.options.customClass.prefix + '-$&'), _this.options.responsive ? _this.classes.responsive:'' ].join(' ')); if(!$original.prop('disabled')){ isEnabled=true; $outerWrapper.removeClass(_this.classes.disabled).on('mouseenter' + bindSufix + ' mouseleave' + bindSufix, function(e){ $(this).toggleClass(_this.classes.hover); if(_this.options.openOnHover){ clearTimeout(_this.closeTimer); e.type=='mouseleave' ? _this.closeTimer=setTimeout(_close, _this.options.hoverIntentTimeout):_open(); }}); $wrapper.on('click' + bindSufix, function(e){ isOpen ? _close():_open(e); }); $input .prop({ tabindex: tabindex, disabled: false }) .on('keypress' + bindSufix, _handleSystemKeys) .on('keydown' + bindSufix, function(e){ _handleSystemKeys(e); clearTimeout(_this.resetStr); _this.resetStr=setTimeout(function(){ $input.val(''); }, _this.options.keySearchTimeout); var key=e.keyCode||e.which; if(key > 36&&key < 41){ if(!_this.options.allowWrap){ if((key < 39&&selected==0)||(key > 38&&(selected + 1)==_this.items.length)){ return; }} _select(_utils[(key < 39 ? 'previous':'next') + 'EnabledItem'](_this.items, selected)); }}) .on('focusin' + bindSufix, function(e){ isOpen||_open(e); }) .on('oninput' in $input[0] ? 'input':'keyup', function(){ if($input.val().length){ $.each(_this.items, function(i, elm){ if(RegExp('^' + $input.val(), 'i').test(elm.slug)&&!elm.disabled){ _select(i); return false; }}); }}); $original.prop('tabindex', false); $li=$('li', $items.removeAttr('style')).on({ mousedown: function(e){ e.preventDefault(); e.stopPropagation(); }, click: function(){ _select($(this).data('index'), true); return false; }}).filter('[data-index]'); }else{ $outerWrapper.addClass(_this.classes.disabled); $input.prop('disabled', true); } _utils.triggerCallback('Init', _this); } function _refresh(){ _utils.triggerCallback('Refresh', _this); _populate(); } function _handleSystemKeys(e){ var key=e.keyCode||e.which; if(key==13){ e.preventDefault(); } if(/^(9|13|27)$/.test(key)){ e.stopPropagation(); _select(selected, true); }} function _calculateOptionsDimensions(){ var hiddenChildren=$items.closest(':visible').children(':hidden').addClass(_this.classes.tempshow), maxHeight=_this.options.maxHeight, itemsWidth=$items.outerWidth(), wrapperWidth=$wrapper.outerWidth() - (itemsWidth - $items.width()); if(!_this.options.expandToItemText||wrapperWidth > itemsWidth) finalWidth=wrapperWidth; else { $items.css('overflow', 'scroll'); $outerWrapper.width(9e4); finalWidth=$items.width(); $items.css('overflow', ''); $outerWrapper.width(''); } $items.width(finalWidth).height() > maxHeight&&$items.height(maxHeight); hiddenChildren.removeClass(_this.classes.tempshow); } function _open(e){ _utils.triggerCallback('BeforeOpen', _this); if(e){ e.preventDefault(); e.stopPropagation(); } if(isEnabled){ _calculateOptionsDimensions(); $('.' + _this.classes.hideselect, '.' + _this.classes.open).children()[pluginName]('close'); isOpen=true; itemsHeight=$items.outerHeight(); itemsInnerHeight=$items.height(); $outerWrapper.addClass(_this.classes.open); $input.val(''); e&&e.type!=='focusin'&&$input.focus(); $doc.on('click' + bindSufix, _close).on('scroll' + bindSufix, _isInViewport); _isInViewport(); if(_this.options.preventWindowScroll){ $doc.on('mousewheel' + bindSufix + ' DOMMouseScroll' + bindSufix, '.' + _this.classes.scroll, function(e){ var orgEvent=e.originalEvent, scrollTop=$(this).scrollTop(), deltaY=0; if('detail' in orgEvent){ deltaY=orgEvent.detail * -1; } if('wheelDelta' in orgEvent){ deltaY=orgEvent.wheelDelta; } if('wheelDeltaY' in orgEvent){ deltaY=orgEvent.wheelDeltaY; } if('deltaY' in orgEvent){ deltaY=orgEvent.deltaY * -1; } if(scrollTop==(this.scrollHeight - itemsInnerHeight)&&deltaY < 0||scrollTop==0&&deltaY > 0){ e.preventDefault(); }}); } _detectItemVisibility(selected); _utils.triggerCallback('Open', _this); }} function _isInViewport(){ var scrollTop=$win.scrollTop(); var winHeight=$win.height(); var uiPosX=$outerWrapper.offset().top; var uiHeight=$outerWrapper.outerHeight(); var fitsDown=(uiPosX + uiHeight + itemsHeight) <=(scrollTop + winHeight); var fitsAbove=(uiPosX - itemsHeight) > scrollTop; var renderAbove = !fitsDown&&fitsAbove; $outerWrapper.toggleClass(_this.classes.above, renderAbove); } function _close(){ _utils.triggerCallback('BeforeClose', _this); if(currValue!=selected){ _utils.triggerCallback('BeforeChange', _this); var text=_this.items[selected].text; $original .prop('selectedIndex', currValue=selected) .data('value', text); $label.html($.isFunction(labelBuilder) ? labelBuilder(_this.items[selected]):_utils.format(labelBuilder, _this.items[selected]) ) _utils.triggerCallback('Change', _this); } $doc.off(bindSufix); $outerWrapper.removeClass(_this.classes.open); isOpen=false; _utils.triggerCallback('Close', _this); } function _select(index, close){ if(index==undefined){ return; } if(!_this.items[index].disabled){ $li .removeClass('selected') .eq(selected=index) .addClass('selected'); _detectItemVisibility(index); close&&_close(); }} function _detectItemVisibility(index){ var liHeight=$li.eq(index).outerHeight(), liTop=$li[index].offsetTop, itemsScrollTop=$itemsScroll.scrollTop(), scrollT=liTop + liHeight * 2; $itemsScroll.scrollTop(scrollT > itemsScrollTop + itemsHeight ? scrollT - itemsHeight : liTop - liHeight < itemsScrollTop ? liTop - liHeight : itemsScrollTop ); } function _destroy(preserveData){ if(isEnabled){ $items.add($wrapper).add($input).remove(); !preserveData&&$original.removeData(pluginName).removeData('value'); $original.prop('tabindex', tabindex).off(bindSufix).off(eventTriggers).unwrap().unwrap(); isEnabled=false; }} _init(opts); }; $.fn[pluginName]=function(args){ return this.each(function(){ var data=$.data(this, pluginName); if(data&&!data.disableOnMobile) (''+args===args&&data[args]) ? data[args]():data.init(args); else $.data(this, pluginName, new Selectric(this, args)); }); }; $.fn[pluginName].hooks=hooks; })); (function($, window, document, undefined){ var $window=$(window); $.fn.lazyload=function(options){ var elements=this; var $container; var settings={ threshold:0, failure_limit:0, event:"scroll", effect:"show", container:window, data_attribute:"original", data_srcset:"srcset", skip_invisible:false, appear:null, load:null, placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" }; function update(){ var counter=0; elements.each(function(){ var $this=$(this); if(settings.skip_invisible&&!$this.is(":visible")){ return; } if($.abovethetop(this, settings) || $.leftofbegin(this, settings)){ }else if(!$.belowthefold(this, settings) && ($this.closest('.owl-carousel').length||!$.rightoffold(this, settings))){ $this.trigger("appear"); counter=0; }else{ if(++counter > settings.failure_limit){ return false; }} }); } if(options){ if(undefined!==options.failurelimit){ options.failure_limit=options.failurelimit; delete options.failurelimit; } if(undefined!==options.effectspeed){ options.effect_speed=options.effectspeed; delete options.effectspeed; } $.extend(settings, options); } $container=(settings.container===undefined || settings.container===window) ? $window:$(settings.container); if(0===settings.event.indexOf("scroll")){ $container.bind(settings.event, function(){ return update(); }); } this.each(function(){ var self=this; var $self=$(self); self.loaded=false; if($self.attr("src")===undefined||$self.attr("src")===false){ if($self.is("img")){ $self.attr("src", settings.placeholder); }} $self.one("appear", function(e){ if(!this.loaded){ if(settings.appear){ var elements_left=elements.length; settings.appear.call(self, elements_left, settings); } $("") .bind("load", function(){ var original=$self.attr("data-" + settings.data_attribute), srcset=$self.attr("data-" + settings.data_srcset); $self.hide().addClass('no-transition'); if($self.is("img")){ $self.attr("src", original); if(srcset){ $self.attr("srcset", srcset); }}else{ $self.css("background-image", "url('" + original + "')"); } $self[settings.effect](settings.effect_speed, function(){ $self.removeClass('no-transition'); }); self.loaded=true; var temp=$.grep(elements, function(element){ return !element.loaded; }); elements=$(temp); if(settings.load){ var elements_left=elements.length; settings.load.call(self, elements_left, settings); }}) .attr("src", $self.attr("data-" + settings.data_attribute)); }}); if(0!==settings.event.indexOf("scroll")){ $self.bind(settings.event, function(){ if(!self.loaded){ $self.trigger("appear"); }}); } if($self.is(":hidden")&&!self.loaded){ $self.trigger("appear"); }}); $window.bind("resize", function(){ update(); }); if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)){ $window.bind("pageshow", function(event){ if(event.originalEvent&&event.originalEvent.persisted){ elements.each(function(){ $(this).trigger("appear"); }); }}); } $(document).ready(function(){ update(); }); return this; }; $.belowthefold=function(element, settings){ var fold; if(settings.container===undefined||settings.container===window){ fold=(window.innerHeight ? window.innerHeight:$window.height()) + $window.scrollTop(); }else{ fold=$(settings.container).offset().top + $(settings.container).height(); } return fold <=$(element).offset().top - settings.threshold; }; $.rightoffold=function(element, settings){ var fold; if(settings.container===undefined||settings.container===window){ fold=$window.width() + $window.scrollLeft(); }else{ fold=$(settings.container).offset().left + $(settings.container).width(); } return fold <=$(element).offset().left - settings.threshold; }; $.abovethetop=function(element, settings){ var fold; if(settings.container===undefined||settings.container===window){ fold=$window.scrollTop(); }else{ fold=$(settings.container).offset().top; } return fold >=$(element).offset().top + settings.threshold + $(element).height(); }; $.leftofbegin=function(element, settings){ var fold; if(settings.container===undefined||settings.container===window){ fold=$window.scrollLeft(); }else{ fold=$(settings.container).offset().left; } return fold >=$(element).offset().left + settings.threshold + $(element).width(); }; $.inviewport=function(element, settings){ return !$.rightoffold(element, settings)&&!$.leftofbegin(element, settings) && !$.belowthefold(element, settings)&&!$.abovethetop(element, settings); }; $.extend($.expr[":"], { "below-the-fold":function(a){ return $.belowthefold(a, {threshold:0});}, "above-the-top":function(a){ return !$.belowthefold(a, {threshold:0});}, "right-of-screen": function(a){ return $.rightoffold(a, {threshold:0});}, "left-of-screen":function(a){ return !$.rightoffold(a, {threshold:0});}, "in-viewport":function(a){ return $.inviewport(a, {threshold:0});}, "above-the-fold":function(a){ return !$.belowthefold(a, {threshold:0});}, "right-of-fold":function(a){ return $.rightoffold(a, {threshold:0});}, "left-of-fold":function(a){ return !$.rightoffold(a, {threshold:0});}}); })(jQuery, window, document); !(function(root, factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof exports==='object'){ factory(require('jquery')); }else{ factory(root.jQuery); }})(this, function($){ 'use strict'; var PLUGIN_NAME='vide'; var DEFAULTS={ volume: 1, playbackRate: 1, muted: true, loop: true, autoplay: true, position: '50% 50%', posterType: 'detect', resizing: true, bgColor: 'transparent', className: '' }; var NOT_IMPLEMENTED_MSG='Not implemented'; function parseOptions(str){ var obj={}; var delimiterIndex; var option; var prop; var val; var arr; var len; var i; arr=str.replace(/\s*:\s*/g, ':').replace(/\s*,\s*/g, ',').split(','); for (i=0, len=arr.length; i < len; i++){ option=arr[i]; if(option.search(/^(http|https|ftp):\/\//)!==-1 || option.search(':')===-1 ){ break; } delimiterIndex=option.indexOf(':'); prop=option.substring(0, delimiterIndex); val=option.substring(delimiterIndex + 1); if(!val){ val=undefined; } if(typeof val==='string'){ val=val==='true'||(val==='false' ? false:val); } if(typeof val==='string'){ val = !isNaN(val) ? +val:val; } obj[prop]=val; } if(prop==null&&val==null){ return str; } return obj; } function parsePosition(str){ str='' + str; var args=str.split(/\s+/); var x='50%'; var y='50%'; var len; var arg; var i; for (i=0, len=args.length; i < len; i++){ arg=args[i]; if(arg==='left'){ x='0%'; }else if(arg==='right'){ x='100%'; }else if(arg==='top'){ y='0%'; }else if(arg==='bottom'){ y='100%'; }else if(arg==='center'){ if(i===0){ x='50%'; }else{ y='50%'; }}else{ if(i===0){ x=arg; }else{ y=arg; }} } return { x: x, y: y };} function findPoster(path, callback){ var onLoad=function(){ callback(this.src); }; $('').on('load', onLoad); $('').on('load', onLoad); $('').on('load', onLoad); $('').on('load', onLoad); } function Vide(element, path, options){ this.$element=$(element); if(typeof path==='string'){ path=parseOptions(path); } if(!options){ options={};}else if(typeof options==='string'){ options=parseOptions(options); } if(typeof path==='string'){ path=path.replace(/\.\w*$/, ''); }else if(typeof path==='object'){ for (var i in path){ if(path.hasOwnProperty(i)){ path[i]=path[i].replace(/\.\w*$/, ''); }} } this.settings=$.extend({}, DEFAULTS, options); this.path=path; try { this.init(); } catch (e){ if(e.message!==NOT_IMPLEMENTED_MSG){ throw e; }} } Vide.prototype.init=function(){ var vide=this; var path=vide.path; var poster=path; var sources=''; var $element=vide.$element; var settings=vide.settings; var position=parsePosition(settings.position); var posterType=settings.posterType; var $video; var $wrapper; $wrapper=vide.$wrapper=$('
    ') .addClass(settings.className) .css({ position: 'absolute', 'z-index': -1, top: 0, left: 0, bottom: 0, right: 0, overflow: 'hidden', '-webkit-background-size': 'cover', '-moz-background-size': 'cover', '-o-background-size': 'cover', 'background-size': 'cover', 'background-color': settings.bgColor, 'background-repeat': 'no-repeat', 'background-position': position.x + ' ' + position.y }); if(typeof path==='object'){ if(path.poster){ poster=path.poster; }else{ if(path.mp4){ poster=path.mp4; }else if(path.webm){ poster=path.webm; }else if(path.ogv){ poster=path.ogv; }} } if(posterType==='detect'){ findPoster(poster, function(url){ $wrapper.css('background-image', 'url(' + url + ')'); }); }else if(posterType!=='none'){ $wrapper.css('background-image', 'url(' + poster + '.' + posterType + ')'); } if($element.css('position')==='static'){ $element.css('position', 'relative'); } $element.prepend($wrapper); if(typeof path==='object'){ if(path.mp4){ sources +=''; } if(path.webm){ sources +=''; } if(path.ogv){ sources +=''; } $video=vide.$video=$(''); }else{ $video=vide.$video=$(''); } try { $video .prop({ autoplay: settings.autoplay, loop: settings.loop, volume: settings.volume, muted: settings.muted, defaultMuted: settings.muted, playbackRate: settings.playbackRate, defaultPlaybackRate: settings.playbackRate }); } catch (e){ throw new Error(NOT_IMPLEMENTED_MSG); } $video.css({ margin: 'auto', position: 'absolute', 'z-index': -1, top: position.y, left: position.x, '-webkit-transform': 'translate(-' + position.x + ', -' + position.y + ')', '-ms-transform': 'translate(-' + position.x + ', -' + position.y + ')', '-moz-transform': 'translate(-' + position.x + ', -' + position.y + ')', transform: 'translate(-' + position.x + ', -' + position.y + ')', visibility: 'hidden', opacity: 0 }) .one('canplaythrough.' + PLUGIN_NAME, function(){ vide.resize(); }) .one('playing.' + PLUGIN_NAME, function(){ $video.css({ visibility: 'visible', opacity: 1 }); $wrapper.css('background-image', 'none'); }); $element.on('resize.' + PLUGIN_NAME, function(){ if(settings.resizing){ vide.resize(); }}); $wrapper.append($video); }; Vide.prototype.getVideoObject=function(){ return this.$video[0]; }; Vide.prototype.resize=function(){ if(!this.$video){ return; } var $wrapper=this.$wrapper; var $video=this.$video; var video=$video[0]; var videoHeight=video.videoHeight; var videoWidth=video.videoWidth; var wrapperHeight=$wrapper.height(); var wrapperWidth=$wrapper.width(); if(wrapperWidth / videoWidth > wrapperHeight / videoHeight){ $video.css({ width: wrapperWidth + 2, height: 'auto' }); }else{ $video.css({ width: 'auto', height: wrapperHeight + 2 }); }}; Vide.prototype.destroy=function(){ delete $[PLUGIN_NAME].lookup[this.index]; this.$video&&this.$video.off(PLUGIN_NAME); this.$element.off(PLUGIN_NAME).removeData(PLUGIN_NAME); this.$wrapper.remove(); }; $[PLUGIN_NAME]={ lookup: [] }; $.fn[PLUGIN_NAME]=function(path, options){ var instance; this.each(function(){ instance=$.data(this, PLUGIN_NAME); instance&&instance.destroy(); instance=new Vide(this, path, options); instance.index=$[PLUGIN_NAME].lookup.push(instance) - 1; $.data(this, PLUGIN_NAME, instance); }); return this; }; $(document).ready(function(){ var $window=$(window); $window.on('resize.' + PLUGIN_NAME, function(){ for (var len=$[PLUGIN_NAME].lookup.length, i=0, instance; i < len; i++){ instance=$[PLUGIN_NAME].lookup[i]; if(instance&&instance.settings.resizing){ instance.resize(); }} }); $window.on('unload.' + PLUGIN_NAME, function(){ return false; }); $(document).find('[data-' + PLUGIN_NAME + '-bg]').each(function(i, element){ var $element=$(element); var options=$element.data(PLUGIN_NAME + '-options'); var path=$element.data(PLUGIN_NAME + '-bg'); $element[PLUGIN_NAME](path, options); }); }); }); (function($,sr){ var debounce=function (func, threshold, execAsap){ var timeout; return function debounced (){ var obj=this, args=arguments; function delayed (){ if(!execAsap) func.apply(obj, args); timeout=null; }; if(timeout) clearTimeout(timeout); else if(execAsap) func.apply(obj, args); timeout=setTimeout(delayed, threshold||100); };} jQuery.fn[sr]=function(fn){ return fn ? this.bind('resize', debounce(fn)):this.trigger(sr); };})(jQuery,'smartresize'); ; (function (root, factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else{ factory(root.jQuery); }}(this, function ($){ 'use strict'; var debug=false; var browser={ data: { index: 0, name: 'scrollbar' }, macosx: /mac/i.test(navigator.platform), mobile: /android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent), overlay: null, scroll: null, scrolls: [], webkit: /webkit/i.test(navigator.userAgent)&&!/edge\/\d+/i.test(navigator.userAgent) }; browser.scrolls.add=function (instance){ this.remove(instance).push(instance); }; browser.scrolls.remove=function (instance){ while ($.inArray(instance, this) >=0){ this.splice($.inArray(instance, this), 1); } return this; }; var defaults={ "autoScrollSize": true, "autoUpdate": true, "debug": false, "disableBodyScroll": false, "duration": 200, "ignoreMobile": true, "ignoreOverlay": true, "scrollStep": 30, "showArrows": false, "stepScrolling": true, "scrollx": null, "scrolly": null, "onDestroy": null, "onInit": null, "onScroll": null, "onUpdate": null }; var BaseScrollbar=function (container){ if(!browser.scroll){ browser.overlay=isScrollOverlaysContent(); browser.scroll=getBrowserScrollSize(); updateScrollbars(); $(window).resize(function (){ var forceUpdate=false; if(browser.scroll&&(browser.scroll.height||browser.scroll.width)){ var scroll=getBrowserScrollSize(); if(scroll.height!==browser.scroll.height||scroll.width!==browser.scroll.width){ browser.scroll=scroll; forceUpdate=true; }} updateScrollbars(forceUpdate); }); } this.container=container; this.namespace='.scrollbar_' + browser.data.index++; this.options=$.extend({}, defaults, window.jQueryScrollbarOptions||{}); this.scrollTo=null; this.scrollx={}; this.scrolly={}; container.data(browser.data.name, this); browser.scrolls.add(this); }; BaseScrollbar.prototype={ destroy: function (){ if(!this.wrapper){ return; } this.container.removeData(browser.data.name); browser.scrolls.remove(this); var scrollLeft=this.container.scrollLeft(); var scrollTop=this.container.scrollTop(); this.container.insertBefore(this.wrapper).css({ "height": "", "margin": "", "max-height": "" }) .removeClass('scroll-content scroll-scrollx_visible scroll-scrolly_visible') .off(this.namespace) .scrollLeft(scrollLeft) .scrollTop(scrollTop); this.scrollx.scroll.removeClass('scroll-scrollx_visible').find('div').andSelf().off(this.namespace); this.scrolly.scroll.removeClass('scroll-scrolly_visible').find('div').andSelf().off(this.namespace); this.wrapper.remove(); $(document).add('body').off(this.namespace); if($.isFunction(this.options.onDestroy)){ this.options.onDestroy.apply(this, [this.container]); }}, init: function (options){ var S=this, c=this.container, cw=this.containerWrapper||c, namespace=this.namespace, o=$.extend(this.options, options||{}), s={x: this.scrollx, y: this.scrolly}, w=this.wrapper; var initScroll={ "scrollLeft": c.scrollLeft(), "scrollTop": c.scrollTop() }; if((browser.mobile&&o.ignoreMobile) || (browser.overlay&&o.ignoreOverlay) || (browser.macosx&&!browser.webkit) ){ return false; } if(!w){ this.wrapper=w = $('
    ').addClass('scroll-wrapper').addClass(c.attr('class')) .css('position', c.css('position')=='absolute' ? 'absolute':'relative') .insertBefore(c).append(c); if(c.is('textarea')){ this.containerWrapper=cw=$('
    ').insertBefore(c).append(c); w.addClass('scroll-textarea'); } cw.addClass('scroll-content').css({ "height": "auto", "margin-bottom": browser.scroll.height * -1 + 'px', "margin-right": browser.scroll.width * -1 + 'px', "max-height": "" }); c.on('scroll' + namespace, function (event){ if($.isFunction(o.onScroll)){ o.onScroll.call(S, { "maxScroll": s.y.maxScrollOffset, "scroll": c.scrollTop(), "size": s.y.size, "visible": s.y.visible }, { "maxScroll": s.x.maxScrollOffset, "scroll": c.scrollLeft(), "size": s.x.size, "visible": s.x.visible }); } s.x.isVisible&&s.x.scroll.bar.css('left', c.scrollLeft() * s.x.kx + 'px'); s.y.isVisible&&s.y.scroll.bar.css('top', c.scrollTop() * s.y.kx + 'px'); }); w.on('scroll' + namespace, function (){ w.scrollTop(0).scrollLeft(0); }); if(o.disableBodyScroll){ var handleMouseScroll=function (event){ isVerticalScroll(event) ? s.y.isVisible&&s.y.mousewheel(event) : s.x.isVisible&&s.x.mousewheel(event); }; w.on('MozMousePixelScroll' + namespace, handleMouseScroll); w.on('mousewheel' + namespace, handleMouseScroll); if(browser.mobile){ w.on('touchstart' + namespace, function (event){ var touch=event.originalEvent.touches&&event.originalEvent.touches[0]||event; var originalTouch={ "pageX": touch.pageX, "pageY": touch.pageY }; var originalScroll={ "left": c.scrollLeft(), "top": c.scrollTop() }; $(document).on('touchmove' + namespace, function (event){ var touch=event.originalEvent.targetTouches&&event.originalEvent.targetTouches[0]||event; c.scrollLeft(originalScroll.left + originalTouch.pageX - touch.pageX); c.scrollTop(originalScroll.top + originalTouch.pageY - touch.pageY); event.preventDefault(); }); $(document).on('touchend' + namespace, function (){ $(document).off(namespace); }); }); }} if($.isFunction(o.onInit)){ o.onInit.apply(this, [c]); }}else{ cw.css({ "height": "auto", "margin-bottom": browser.scroll.height * -1 + 'px', "margin-right": browser.scroll.width * -1 + 'px', "max-height": "" }); } $.each(s, function (d, scrollx){ var scrollCallback=null; var scrollForward=1; var scrollOffset=(d==='x') ? 'scrollLeft':'scrollTop'; var scrollStep=o.scrollStep; var scrollTo=function (){ var currentOffset=c[scrollOffset](); c[scrollOffset](currentOffset + scrollStep); if(scrollForward==1&&(currentOffset + scrollStep) >=scrollToValue) currentOffset=c[scrollOffset](); if(scrollForward==-1&&(currentOffset + scrollStep) <=scrollToValue) currentOffset=c[scrollOffset](); if(c[scrollOffset]()==currentOffset&&scrollCallback){ scrollCallback(); }} var scrollToValue=0; if(!scrollx.scroll){ scrollx.scroll=S._getScroll(o['scroll' + d]).addClass('scroll-' + d); if(o.showArrows){ scrollx.scroll.addClass('scroll-element_arrows_visible'); } scrollx.mousewheel=function (event){ if(!scrollx.isVisible||(d==='x'&&isVerticalScroll(event))){ return true; } if(d==='y'&&!isVerticalScroll(event)){ s.x.mousewheel(event); return true; } var delta=event.originalEvent.wheelDelta * -1||event.originalEvent.detail; var maxScrollValue=scrollx.size - scrollx.visible - scrollx.offset; if((delta > 0&&scrollToValue < maxScrollValue)||(delta < 0&&scrollToValue > 0)){ scrollToValue=scrollToValue + delta; if(scrollToValue < 0) scrollToValue=0; if(scrollToValue > maxScrollValue) scrollToValue=maxScrollValue; S.scrollTo=S.scrollTo||{}; S.scrollTo[scrollOffset]=scrollToValue; setTimeout(function (){ if(S.scrollTo){ c.stop().animate(S.scrollTo, 240, 'linear', function (){ scrollToValue=c[scrollOffset](); }); S.scrollTo=null; }}, 1); } event.preventDefault(); return false; }; scrollx.scroll .on('MozMousePixelScroll' + namespace, scrollx.mousewheel) .on('mousewheel' + namespace, scrollx.mousewheel) .on('mouseenter' + namespace, function (){ scrollToValue=c[scrollOffset](); }); scrollx.scroll.find('.scroll-arrow, .scroll-element_track') .on('mousedown' + namespace, function (event){ if(event.which!=1) return true; scrollForward=1; var data={ "eventOffset": event[(d==='x') ? 'pageX':'pageY'], "maxScrollValue": scrollx.size - scrollx.visible - scrollx.offset, "scrollbarOffset": scrollx.scroll.bar.offset()[(d==='x') ? 'left':'top'], "scrollbarSize": scrollx.scroll.bar[(d==='x') ? 'outerWidth':'outerHeight']() }; var timeout=0, timer=0; if($(this).hasClass('scroll-arrow')){ scrollForward=$(this).hasClass("scroll-arrow_more") ? 1:-1; scrollStep=o.scrollStep * scrollForward; scrollToValue=scrollForward > 0 ? data.maxScrollValue:0; }else{ scrollForward=(data.eventOffset > (data.scrollbarOffset + data.scrollbarSize) ? 1 : (data.eventOffset < data.scrollbarOffset ? -1:0)); scrollStep=Math.round(scrollx.visible * 0.75) * scrollForward; scrollToValue=(data.eventOffset - data.scrollbarOffset - (o.stepScrolling ? (scrollForward==1 ? data.scrollbarSize:0) : Math.round(data.scrollbarSize / 2))); scrollToValue=c[scrollOffset]() + (scrollToValue / scrollx.kx); } S.scrollTo=S.scrollTo||{}; S.scrollTo[scrollOffset]=o.stepScrolling ? c[scrollOffset]() + scrollStep:scrollToValue; if(o.stepScrolling){ scrollCallback=function (){ scrollToValue=c[scrollOffset](); clearInterval(timer); clearTimeout(timeout); timeout=0; timer=0; }; timeout=setTimeout(function (){ timer=setInterval(scrollTo, 40); }, o.duration + 100); } setTimeout(function (){ if(S.scrollTo){ c.animate(S.scrollTo, o.duration); S.scrollTo=null; }}, 1); return S._handleMouseDown(scrollCallback, event); }); scrollx.scroll.bar.on('mousedown' + namespace, function (event){ if(event.which!=1) return true; var eventPosition=event[(d==='x') ? 'pageX':'pageY']; var initOffset=c[scrollOffset](); scrollx.scroll.addClass('scroll-draggable'); $(document).on('mousemove' + namespace, function (event){ var diff=parseInt((event[(d==='x') ? 'pageX':'pageY'] - eventPosition) / scrollx.kx, 10); c[scrollOffset](initOffset + diff); }); return S._handleMouseDown(function (){ scrollx.scroll.removeClass('scroll-draggable'); scrollToValue=c[scrollOffset](); }, event); }); }}); $.each(s, function (d, scrollx){ var scrollClass='scroll-scroll' + d + '_visible'; var scrolly=(d=="x") ? s.y:s.x; scrollx.scroll.removeClass(scrollClass); scrolly.scroll.removeClass(scrollClass); cw.removeClass(scrollClass); }); $.each(s, function (d, scrollx){ $.extend(scrollx, (d=="x") ? { "offset": parseInt(c.css('left'), 10)||0, "size": c.prop('scrollWidth'), "visible": w.width() }:{ "offset": parseInt(c.css('top'), 10)||0, "size": c.prop('scrollHeight'), "visible": w.height() }); }); this._updateScroll('x', this.scrollx); this._updateScroll('y', this.scrolly); if($.isFunction(o.onUpdate)){ o.onUpdate.apply(this, [c]); } $.each(s, function (d, scrollx){ var cssOffset=(d==='x') ? 'left':'top'; var cssFullSize=(d==='x') ? 'outerWidth':'outerHeight'; var cssSize=(d==='x') ? 'width':'height'; var offset=parseInt(c.css(cssOffset), 10)||0; var AreaSize=scrollx.size; var AreaVisible=scrollx.visible + offset; var scrollSize=scrollx.scroll.size[cssFullSize]() + (parseInt(scrollx.scroll.size.css(cssOffset), 10)||0); if(o.autoScrollSize){ scrollx.scrollbarSize=parseInt(scrollSize * AreaVisible / AreaSize, 10); scrollx.scroll.bar.css(cssSize, scrollx.scrollbarSize + 'px'); } scrollx.scrollbarSize=scrollx.scroll.bar[cssFullSize](); scrollx.kx=((scrollSize - scrollx.scrollbarSize) / (AreaSize - AreaVisible))||1; scrollx.maxScrollOffset=AreaSize - AreaVisible; }); c.scrollLeft(initScroll.scrollLeft).scrollTop(initScroll.scrollTop).trigger('scroll'); }, _getScroll: function (scroll){ var types={ advanced: [ '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ' ].join(''), simple: [ '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ' ].join('') }; if(types[scroll]){ scroll=types[scroll]; } if(!scroll){ scroll=types['simple']; } if(typeof (scroll)=='string'){ scroll=$(scroll).appendTo(this.wrapper); }else{ scroll=$(scroll); } $.extend(scroll, { bar: scroll.find('.scroll-bar'), size: scroll.find('.scroll-element_size'), track: scroll.find('.scroll-element_track') }); return scroll; }, _handleMouseDown: function(callback, event){ var namespace=this.namespace; $(document).on('blur' + namespace, function (){ $(document).add('body').off(namespace); callback&&callback(); }); $(document).on('dragstart' + namespace, function (event){ event.preventDefault(); return false; }); $(document).on('mouseup' + namespace, function (){ $(document).add('body').off(namespace); callback&&callback(); }); $('body').on('selectstart' + namespace, function (event){ event.preventDefault(); return false; }); event&&event.preventDefault(); return false; }, _updateScroll: function (d, scrollx){ var container=this.container, containerWrapper=this.containerWrapper||container, scrollClass='scroll-scroll' + d + '_visible', scrolly=(d==='x') ? this.scrolly:this.scrollx, offset=parseInt(this.container.css((d==='x') ? 'left':'top'), 10)||0, wrapper=this.wrapper; var AreaSize=scrollx.size; var AreaVisible=scrollx.visible + offset; scrollx.isVisible=(AreaSize - AreaVisible) > 1; if(scrollx.isVisible){ scrollx.scroll.addClass(scrollClass); scrolly.scroll.addClass(scrollClass); containerWrapper.addClass(scrollClass); }else{ scrollx.scroll.removeClass(scrollClass); scrolly.scroll.removeClass(scrollClass); containerWrapper.removeClass(scrollClass); } if(d==='y'){ if(container.is('textarea')||AreaSize < AreaVisible){ containerWrapper.css({ "height": (AreaVisible + browser.scroll.height) + 'px', "max-height": "none" }); }else{ containerWrapper.css({ "max-height": (AreaVisible + browser.scroll.height) + 'px' }); }} if(scrollx.size!=container.prop('scrollWidth') || scrolly.size!=container.prop('scrollHeight') || scrollx.visible!=wrapper.width() || scrolly.visible!=wrapper.height() || scrollx.offset!=(parseInt(container.css('left'), 10)||0) || scrolly.offset!=(parseInt(container.css('top'), 10)||0) ){ $.extend(this.scrollx, { "offset": parseInt(container.css('left'), 10)||0, "size": container.prop('scrollWidth'), "visible": wrapper.width() }); $.extend(this.scrolly, { "offset": parseInt(container.css('top'), 10)||0, "size": this.container.prop('scrollHeight'), "visible": wrapper.height() }); this._updateScroll(d==='x' ? 'y':'x', scrolly); }} }; var CustomScrollbar=BaseScrollbar; $.fn.scrollbar=function (command, args){ if(typeof command!=='string'){ args=command; command='init'; } if(typeof args==='undefined'){ args=[]; } if(!$.isArray(args)){ args=[args]; } this.not('body, .scroll-wrapper').each(function (){ var element=$(this), instance=element.data(browser.data.name); if(instance||command==='init'){ if(!instance){ instance=new CustomScrollbar(element); } if(instance[command]){ instance[command].apply(instance, args); }} }); return this; }; $.fn.scrollbar.options=defaults; var updateScrollbars=(function (){ var timer=0, timerCounter=0; return function (force){ var i, container, options, scroll, wrapper, scrollx, scrolly; for (i=0; i < browser.scrolls.length; i++){ scroll=browser.scrolls[i]; container=scroll.container; options=scroll.options; wrapper=scroll.wrapper; scrollx=scroll.scrollx; scrolly=scroll.scrolly; if(force||(options.autoUpdate&&wrapper&&wrapper.is(':visible') && (container.prop('scrollWidth')!=scrollx.size||container.prop('scrollHeight')!=scrolly.size||wrapper.width()!=scrollx.visible||wrapper.height()!=scrolly.visible))){ scroll.init(); if(options.debug){ window.console&&console.log({ scrollHeight: container.prop('scrollHeight') + ':' + scroll.scrolly.size, scrollWidth: container.prop('scrollWidth') + ':' + scroll.scrollx.size, visibleHeight: wrapper.height() + ':' + scroll.scrolly.visible, visibleWidth: wrapper.width() + ':' + scroll.scrollx.visible }, true); timerCounter++; }} } if(debug&&timerCounter > 10){ window.console&&console.log('Scroll updates exceed 10'); updateScrollbars=function (){};}else{ clearTimeout(timer); timer=setTimeout(updateScrollbars, 300); }};})(); function getBrowserScrollSize(actualSize){ if(browser.webkit&&!actualSize){ return { "height": 0, "width": 0 };} if(!browser.data.outer){ var css={ "border": "none", "box-sizing": "content-box", "height": "200px", "margin": "0", "padding": "0", "width": "200px" }; browser.data.inner=$("
    ").css($.extend({}, css)); browser.data.outer=$("
    ").css($.extend({ "left": "-1000px", "overflow": "scroll", "position": "absolute", "top": "-1000px" }, css)).append(browser.data.inner).appendTo("body"); } browser.data.outer.scrollLeft(1000).scrollTop(1000); return { "height": Math.ceil((browser.data.outer.offset().top - browser.data.inner.offset().top)||0), "width": Math.ceil((browser.data.outer.offset().left - browser.data.inner.offset().left)||0) };} function isScrollOverlaysContent(){ var scrollSize=getBrowserScrollSize(true); return !(scrollSize.height||scrollSize.width); } function isVerticalScroll(event){ var e=event.originalEvent; if(e.axis&&e.axis===e.HORIZONTAL_AXIS) return false; if(e.wheelDeltaX) return false; return true; } if(window.angular){ (function (angular){ angular.module('jQueryScrollbar', []) .provider('jQueryScrollbar', function (){ var defaultOptions=defaults; return { setOptions: function (options){ angular.extend(defaultOptions, options); }, $get: function (){ return { options: angular.copy(defaultOptions) };}};}) .directive('jqueryScrollbar', ['jQueryScrollbar', '$parse', function (jQueryScrollbar, $parse){ return { "restrict": "AC", "link": function (scope, element, attrs){ var model=$parse(attrs.jqueryScrollbar), options=model(scope); element.scrollbar(options||jQueryScrollbar.options) .on('$destroy', function (){ element.scrollbar('destroy'); }); }};}]); })(window.angular); }})); if(typeof Object.create!=='function'){ Object.create=function(obj){ function F(){}; F.prototype=obj; return new F(); };} (function($, window, document, undefined){ var ElevateZoom={ init: function(options, elem){ var self=this; self.elem=elem; self.$elem=$(elem); self.imageSrc=self.$elem.data("zoom-image") ? self.$elem.data("zoom-image"):(self.$elem.data("original") ? self.$elem.data("original"):(self.$elem.attr("href") ? self.$elem.attr("href"):self.$elem.attr("src"))); self.options=$.extend({}, $.fn.elevateZoom.options, options); if(self.options.tint){ self.options.lensColour="none", self.options.lensOpacity="1" } if(self.options.zoomType=="inner"){self.options.showLens=false;} if(self.options.zoomContainer) self.$container=$(self.options.zoomContainer); else self.$container=$('body'); self.$elem.parent().removeAttr('title').removeAttr('alt'); self.zoomImage=self.imageSrc; self.refresh(1); $('#'+self.options.gallery + ' a').click(function(e){ if(self.options.galleryActiveClass){ $('#'+self.options.gallery + ' a').removeClass(self.options.galleryActiveClass); $(this).addClass(self.options.galleryActiveClass); } e.preventDefault(); if($(this).data("zoom-image")){self.zoomImagePre=$(this).data("zoom-image")}else{self.zoomImagePre=$(this).data("image");} self.swaptheimage($(this).data("image"), self.zoomImagePre); return false; }); }, refresh: function(length){ var self=this; setTimeout(function(){ self.fetch(self.imageSrc); }, length||self.options.refresh); }, fetch: function(imgsrc){ var self=this; var newImg=new Image(); newImg.onload=function(){ self.largeWidth=newImg.width; self.largeHeight=newImg.height; self.startZoom(); self.currentImage=self.imageSrc; self.options.onZoomedImageLoaded(self.$elem); } newImg.src=imgsrc; return; }, startZoom: function(){ var self=this; self.nzWidth=self.$elem.width(); self.nzHeight=self.$elem.height(); self.isWindowActive=false; self.isLensActive=false; self.isTintActive=false; self.overWindow=false; if(self.options.imageCrossfade){ self.zoomWrap=self.$elem.wrap('
    '); self.$elem.css('position', 'absolute'); } self.zoomLock=1; self.scrollingLock=false; self.changeBgSize=false; self.currentZoomLevel=self.options.zoomLevel; self.nzOffset=self.$elem.offset(); self.ctOffset=self.$container.offset(); self.widthRatio=(self.largeWidth/self.currentZoomLevel) / self.nzWidth; self.heightRatio=(self.largeHeight/self.currentZoomLevel) / self.nzHeight; if(self.options.zoomType=="window"){ self.zoomWindowStyle="overflow: hidden;" + "background-position: 0px 0px;text-align:center;" + "background-color: " + String(self.options.zoomWindowBgColour) + ";width: " + String(self.options.zoomWindowWidth) + "px;" + "height: " + String(self.options.zoomWindowHeight) + "px;float: left;" + "background-size: "+ self.largeWidth/self.currentZoomLevel+ "px " +self.largeHeight/self.currentZoomLevel + "px;" + "display: none;z-index:100;" + "border: " + String(self.options.borderSize) + "px solid " + self.options.borderColour + ";background-repeat: no-repeat;" + "position: absolute;"; } if(self.options.zoomType=="inner"){ var borderWidth=self.$elem.css("border-left-width"); self.zoomWindowStyle="overflow: hidden;" + "margin-left: -" + String(self.options.borderSize) + "px;" + "margin-top: -" + String(self.options.borderSize) + "px;" + "background-position: 0px 0px;" + "width: " + String(self.nzWidth) + "px;" + "height: " + String(self.nzHeight) + "px;float: left;" + "display: none;" + "cursor:"+(self.options.cursor)+";" + "border: " + String(self.options.borderSize) + "px solid " + self.options.borderColour + ";background-repeat: no-repeat;" + "position: absolute;"; } if(self.options.zoomType=="window"){ if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight=self.nzHeight; }else{ lensHeight=String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.largeWidth < self.options.zoomWindowWidth){ lensWidth=self.nzWidth; }else{ lensWidth=(self.options.zoomWindowWidth/self.widthRatio); } self.lensStyle="background-position: 0px 0px;width: " + String((self.options.zoomWindowWidth)/self.widthRatio) + "px;height: " + String((self.options.zoomWindowHeight)/self.heightRatio) + "px;float: right;display: none;" + "overflow: hidden;" + "z-index: 999;" + "-webkit-transform: translateZ(0);" + "opacity:"+(self.options.lensOpacity)+";filter: alpha(opacity="+(self.options.lensOpacity*100)+"); zoom:1;" + "width:"+lensWidth+"px;" + "height:"+lensHeight+"px;" + "background-color:"+(self.options.lensColour)+";" + "cursor:"+(self.options.cursor)+";" + "border: "+(self.options.lensBorderSize)+"px" + " solid "+(self.options.lensBorderColour)+";background-repeat: no-repeat;position: absolute;"; } self.tintStyle="display: block;" + "position: absolute;" + "background-color: "+self.options.tintColour+";" + "filter:alpha(opacity=0);" + "opacity: 0;" + "width: " + self.nzWidth + "px;" + "height: " + self.nzHeight + "px;" ; self.lensRound=''; if(self.options.zoomType=="lens"){ self.lensStyle="background-position: 0px 0px;" + "float: left;display: none;" + "border: " + String(self.options.borderSize) + "px solid " + self.options.borderColour+";" + "width:"+ String(self.options.lensSize) +"px;" + "height:"+ String(self.options.lensSize)+"px;" + "background-repeat: no-repeat;position: absolute;"; } if(self.options.lensShape=="round"){ self.lensRound="border-top-left-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;" + "border-top-right-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;" + "border-bottom-left-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;" + "border-bottom-right-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;"; } if(typeof self.ctOffset=='undefined') return; if(self.$container.find('.zoomContainer').length) self.$container.find('.zoomContainer').remove(); self.zoomContainer=$('
    '); self.$container.append(self.zoomContainer); if(self.options.containLensZoom&&self.options.zoomType=="lens"){ self.zoomContainer.css("overflow", "hidden"); } if(self.options.zoomType!="inner"){ self.zoomLens=$("
     
    ") .appendTo(self.zoomContainer) .click(function (){ self.$elem.trigger('click'); }); if(self.options.tint){ self.tintContainer=$('
    ').addClass('tintContainer'); self.zoomTint=$("
    "); self.zoomLens.wrap(self.tintContainer); self.zoomTintcss=self.zoomLens.after(self.zoomTint); self.zoomTintImage=$('') .appendTo(self.zoomLens) .click(function (){ self.$elem.trigger('click'); }); }} if(isNaN(self.options.zoomWindowPosition)){ self.zoomWindow=$("
     
    ") .appendTo(self.$container) .click(function (){ self.$elem.trigger('click'); }); }else{ self.zoomWindow=$("
     
    ") .appendTo(self.zoomContainer) .click(function (){ self.$elem.trigger('click'); }); } self.zoomWindowContainer=$('
    ').addClass('zoomWindowContainer').css("width",self.options.zoomWindowWidth); self.zoomWindow.wrap(self.zoomWindowContainer); if(self.options.zoomType=="lens"){ self.zoomLens.css({ backgroundImage: "url('" + self.imageSrc + "')" }); } if(self.options.zoomType=="window"){ self.zoomWindow.css({ backgroundImage: "url('" + self.imageSrc + "')" }); } if(self.options.zoomType=="inner"){ self.zoomWindow.css({ backgroundImage: "url('" + self.imageSrc + "')" }); } self.$elem.bind('touchmove', function(e){ e.preventDefault(); var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0]; self.setPosition(touch); }); self.zoomContainer.bind('touchmove', function(e){ if(self.options.zoomType=="inner"){ self.showHideWindow("show"); } e.preventDefault(); var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0]; self.setPosition(touch); }); self.zoomContainer.bind('touchend', function(e){ self.showHideWindow("hide"); if(self.options.showLens){self.showHideLens("hide");} if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}}); self.$elem.bind('touchend', function(e){ self.showHideWindow("hide"); if(self.options.showLens){self.showHideLens("hide");} if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}}); if(self.options.showLens){ self.zoomLens.bind('touchmove', function(e){ e.preventDefault(); var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0]; self.setPosition(touch); }); self.zoomLens.bind('touchend', function(e){ self.showHideWindow("hide"); if(self.options.showLens){self.showHideLens("hide");} if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}}); } self.$elem.bind('mousemove', function(e){ if(self.overWindow==false){self.setElements("show");} if(self.lastX!==e.clientX||self.lastY!==e.clientY){ self.setPosition(e); self.currentLoc=e; } self.lastX=e.clientX; self.lastY=e.clientY; }); self.zoomContainer.bind('mousemove', function(e){ if(self.overWindow==false){self.setElements("show");} if(self.lastX!==e.clientX||self.lastY!==e.clientY){ self.setPosition(e); self.currentLoc=e; } self.lastX=e.clientX; self.lastY=e.clientY; }); if(self.options.zoomType!="inner"){ self.zoomLens.bind('mousemove', function(e){ if(self.lastX!==e.clientX||self.lastY!==e.clientY){ self.setPosition(e); self.currentLoc=e; } self.lastX=e.clientX; self.lastY=e.clientY; }); } if(self.options.tint&&self.options.zoomType!="inner"){ self.zoomTint.bind('mousemove', function(e){ if(self.lastX!==e.clientX||self.lastY!==e.clientY){ self.setPosition(e); self.currentLoc=e; } self.lastX=e.clientX; self.lastY=e.clientY; }); } if(self.options.zoomType=="inner"){ self.zoomWindow.bind('mousemove', function(e){ if(self.lastX!==e.clientX||self.lastY!==e.clientY){ self.setPosition(e); self.currentLoc=e; } self.lastX=e.clientX; self.lastY=e.clientY; }); } self.zoomContainer.add(self.$elem).mouseenter(function(){ if(self.overWindow==false){self.setElements("show");}}).mouseleave(function(){ if(!self.scrollLock){ self.setElements("hide"); }}); if(self.options.zoomType!="inner"){ self.zoomWindow.mouseenter(function(){ self.overWindow=true; self.setElements("hide"); }).mouseleave(function(){ self.overWindow=false; }); } if(self.options.zoomLevel!=1){ } if(self.options.minZoomLevel){ self.minZoomLevel=self.options.minZoomLevel; }else{ self.minZoomLevel=self.options.scrollZoomIncrement * 2; } if(self.options.scrollZoom){ self.zoomContainer.add(self.$elem).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function(e){ self.scrollLock=true; clearTimeout($.data(this, 'timer')); $.data(this, 'timer', setTimeout(function(){ self.scrollLock=false; }, 250)); var theEvent=e.originalEvent.wheelDelta||e.originalEvent.detail*-1 e.stopImmediatePropagation(); e.stopPropagation(); e.preventDefault(); if(theEvent /120 > 0){ if(self.currentZoomLevel >=self.minZoomLevel){ self.changeZoomLevel(self.currentZoomLevel-self.options.scrollZoomIncrement); }}else{ if(self.options.maxZoomLevel){ if(self.currentZoomLevel <=self.options.maxZoomLevel){ self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement); }}else{ self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement); }} return false; }); }}, setElements: function(type){ var self=this; if(!self.options.zoomEnabled){return false;} if(type=="show"){ if(self.isWindowSet){ if(self.options.zoomType=="inner"){self.showHideWindow("show");} if(self.options.zoomType=="window"){self.showHideWindow("show");} if(self.options.showLens){self.showHideLens("show");} if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("show"); }} } if(type=="hide"){ if(self.options.zoomType=="window"){self.showHideWindow("hide");} if(!self.options.tint){self.showHideWindow("hide");} if(self.options.showLens){self.showHideLens("hide");} if(self.options.tint){ self.showHideTint("hide");}} }, setPosition: function(e){ var self=this; if(!self.options.zoomEnabled){return false;} self.nzHeight=self.$elem.height(); self.nzWidth=self.$elem.width(); self.nzOffset=self.$elem.offset(); self.ctOffset=self.$container.offset(); if(self.options.tint&&self.options.zoomType!="inner"){ self.zoomTint.css({ top: 0}); self.zoomTint.css({ left: 0}); } if(self.options.responsive&&!self.options.scrollZoom){ if(self.options.showLens){ if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight=self.nzHeight; }else{ lensHeight=String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.largeWidth < self.options.zoomWindowWidth){ lensWidth=self.nzWidth; }else{ lensWidth=(self.options.zoomWindowWidth/self.widthRatio); } self.widthRatio=self.largeWidth / self.nzWidth; self.heightRatio=self.largeHeight / self.nzHeight; if(self.options.zoomType!="lens"){ if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight=self.nzHeight; }else{ lensHeight=String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.options.zoomWindowWidth < self.options.zoomWindowWidth){ lensWidth=self.nzWidth; }else{ lensWidth=(self.options.zoomWindowWidth/self.widthRatio); } self.zoomLens.css('width', lensWidth); self.zoomLens.css('height', lensHeight); if(self.options.tint){ self.zoomTintImage.css('width', self.nzWidth); self.zoomTintImage.css('height', self.nzHeight); }} if(self.options.zoomType=="lens"){ self.zoomLens.css({ width: String(self.options.lensSize) + 'px', height: String(self.options.lensSize) + 'px' }) }} } self.zoomContainer.css({ top: self.nzOffset.top - self.ctOffset.top}); self.zoomContainer.css({ left: self.nzOffset.left - self.ctOffset.left}); self.mouseLeft=parseInt(e.pageX - self.nzOffset.left); self.mouseTop=parseInt(e.pageY - self.nzOffset.top); if(self.options.zoomType=="window"){ self.Etoppos=(self.mouseTop < (self.zoomLens.height()/2)); self.Eboppos=(self.mouseTop > self.nzHeight - (self.zoomLens.height()/2)-(self.options.lensBorderSize*2)); self.Eloppos=(self.mouseLeft < 0+((self.zoomLens.width()/2))); self.Eroppos=(self.mouseLeft > (self.nzWidth - (self.zoomLens.width()/2)-(self.options.lensBorderSize*2))); } if(self.options.zoomType=="inner"){ self.Etoppos=(self.mouseTop < ((self.nzHeight/2)/self.heightRatio)); self.Eboppos=(self.mouseTop > (self.nzHeight - ((self.nzHeight/2)/self.heightRatio))); self.Eloppos=(self.mouseLeft < 0+(((self.nzWidth/2)/self.widthRatio))); self.Eroppos=(self.mouseLeft > (self.nzWidth - (self.nzWidth/2)/self.widthRatio-(self.options.lensBorderSize*2))); } if(self.mouseLeft <=0||self.mouseTop < 0||self.mouseLeft > self.nzWidth||self.mouseTop > self.nzHeight){ self.setElements("hide"); return; }else{ if(self.options.showLens){ self.lensLeftPos=String(self.mouseLeft - self.zoomLens.width() / 2); self.lensTopPos=String(self.mouseTop - self.zoomLens.height() / 2); } if(self.Etoppos){ self.lensTopPos=0; } if(self.Eloppos){ self.windowLeftPos=0; self.lensLeftPos=0; self.tintpos=0; } if(self.options.zoomType=="window"){ if(self.Eboppos){ self.lensTopPos=Math.max((self.nzHeight)-self.zoomLens.height()-(self.options.lensBorderSize*2), 0); } if(self.Eroppos){ self.lensLeftPos=(self.nzWidth-(self.zoomLens.width())-(self.options.lensBorderSize*2)); }} if(self.options.zoomType=="inner"){ if(self.Eboppos){ self.lensTopPos=Math.max(((self.nzHeight)-(self.options.lensBorderSize*2)), 0); } if(self.Eroppos){ self.lensLeftPos=(self.nzWidth-(self.nzWidth)-(self.options.lensBorderSize*2)); }} if(self.options.zoomType=="lens"){ self.windowLeftPos=String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomLens.width() / 2) * (-1)); self.windowTopPos=String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomLens.height() / 2) * (-1)); self.zoomLens.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' }); if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType=="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); }else{ if(self.options.zoomType=="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.changeBgSize=false; } self.setWindowPostition(e); } if(self.options.tint&&self.options.zoomType!="inner"){ self.setTintPosition(e); } if(self.options.zoomType=="window"){ self.setWindowPostition(e); } if(self.options.zoomType=="inner"){ self.setWindowPostition(e); } if(self.options.showLens){ if(self.fullwidth&&self.options.zoomType!="lens"){ self.lensLeftPos=0; } self.zoomLens.css({ left: self.lensLeftPos + 'px', top: self.lensTopPos + 'px' }) }} }, showHideWindow: function(change){ var self=this; if(change=="show"){ if(!self.isWindowActive){ if(self.options.zoomWindowFadeIn){ self.zoomWindow.stop(true, true, false).fadeIn(self.options.zoomWindowFadeIn); }else{self.zoomWindow.show();} self.isWindowActive=true; }} if(change=="hide"){ if(self.isWindowActive){ if(self.options.zoomWindowFadeOut){ self.zoomWindow.stop(true, true).fadeOut(self.options.zoomWindowFadeOut); }else{self.zoomWindow.hide();} self.isWindowActive=false; }} }, showHideLens: function(change){ var self=this; if(change=="show"){ if(!self.isLensActive){ if(self.options.lensFadeIn){ self.zoomLens.stop(true, true, false).fadeIn(self.options.lensFadeIn); }else{self.zoomLens.show();} self.isLensActive=true; }} if(change=="hide"){ if(self.isLensActive){ if(self.options.lensFadeOut){ self.zoomLens.stop(true, true).fadeOut(self.options.lensFadeOut); }else{self.zoomLens.hide();} self.isLensActive=false; }} }, showHideTint: function(change){ var self=this; if(change=="show"){ if(!self.isTintActive){ if(self.options.zoomTintFadeIn){ self.zoomTint.css({opacity:self.options.tintOpacity}).animate().stop(true, true).fadeIn("slow"); }else{ self.zoomTint.css({opacity:self.options.tintOpacity}).animate(); self.zoomTint.show(); } self.isTintActive=true; }} if(change=="hide"){ if(self.isTintActive){ if(self.options.zoomTintFadeOut){ self.zoomTint.stop(true, true).fadeOut(self.options.zoomTintFadeOut); }else{self.zoomTint.hide();} self.isTintActive=false; }} }, setLensPostition: function(e){ }, setWindowPostition: function(e){ var self=this; if(!isNaN(self.options.zoomWindowPosition)){ switch (self.options.zoomWindowPosition){ case 1: self.windowOffsetTop=(self.options.zoomWindowOffety); self.windowOffsetLeft=(+self.nzWidth); break; case 2: if(self.options.zoomWindowHeight > self.nzHeight){ self.windowOffsetTop=((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1); self.windowOffsetLeft=(self.nzWidth); }else{ } break; case 3: self.windowOffsetTop=(self.nzHeight - self.zoomWindow.height() - (self.options.borderSize*2)); self.windowOffsetLeft=(self.nzWidth); break; case 4: self.windowOffsetTop=(self.nzHeight); self.windowOffsetLeft=(self.nzWidth); break; case 5: self.windowOffsetTop=(self.nzHeight); self.windowOffsetLeft=(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2)); break; case 6: if(self.options.zoomWindowHeight > self.nzHeight){ self.windowOffsetTop=(self.nzHeight); self.windowOffsetLeft=((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1); }else{ } break; case 7: self.windowOffsetTop=(self.nzHeight); self.windowOffsetLeft=0; break; case 8: self.windowOffsetTop=(self.nzHeight); self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1); break; case 9: self.windowOffsetTop=(self.nzHeight - self.zoomWindow.height() - (self.options.borderSize*2)); self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1); break; case 10: if(self.options.zoomWindowHeight > self.nzHeight){ self.windowOffsetTop=((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1); self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1); }else{ } break; case 11: self.windowOffsetTop=(self.options.zoomWindowOffety); self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1); break; case 12: self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1); self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1); break; case 13: self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1); self.windowOffsetLeft=(0); break; case 14: if(self.options.zoomWindowHeight > self.nzHeight){ self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1); self.windowOffsetLeft=((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1); }else{ } break; case 15: self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1); self.windowOffsetLeft=(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2)); break; case 16: self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1); self.windowOffsetLeft=(self.nzWidth); break; default: self.windowOffsetTop=(self.options.zoomWindowOffety); self.windowOffsetLeft=(self.nzWidth); }}else{ self.externalContainer=$('#'+self.options.zoomWindowPosition); self.externalContainerWidth=self.externalContainer.width(); self.externalContainerHeight=self.externalContainer.height(); self.externalContainerOffset=self.externalContainer.offset(); self.windowOffsetTop=self.externalContainerOffset.top; self.windowOffsetLeft=self.externalContainerOffset.left; } self.isWindowSet=true; self.windowOffsetTop=self.windowOffsetTop + self.options.zoomWindowOffety; self.windowOffsetLeft=self.windowOffsetLeft + self.options.zoomWindowOffetx; self.zoomWindow.css({ top: self.windowOffsetTop}); self.zoomWindow.css({ left: self.windowOffsetLeft}); if(self.options.zoomType=="inner"){ self.zoomWindow.css({ top: 0}); self.zoomWindow.css({ left: 0}); } self.windowLeftPos=String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1)); self.windowTopPos=String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1)); if(self.Etoppos){self.windowTopPos=0;} if(self.Eloppos){self.windowLeftPos=0;} if(self.Eboppos){self.windowTopPos=(self.largeHeight/self.currentZoomLevel-self.zoomWindow.height())*(-1); } if(self.Eroppos){self.windowLeftPos=((self.largeWidth/self.currentZoomLevel-self.zoomWindow.width())*(-1));} if(self.fullheight){ self.windowTopPos=0; } if(self.fullwidth){ self.windowLeftPos=0; } if(self.options.zoomType=="window"||self.options.zoomType=="inner"){ if(self.zoomLock==1){ if(self.widthRatio <=1){ self.windowLeftPos=0; } if(self.heightRatio <=1){ self.windowTopPos=0; }} if(self.largeHeight < self.options.zoomWindowHeight){ self.windowTopPos=0; } if(self.largeWidth < self.options.zoomWindowWidth){ self.windowLeftPos=0; } if(self.options.easing){ if(!self.xp){self.xp=0;} if(!self.yp){self.yp=0;} if(!self.loop){ self.loop=setInterval(function(){ self.xp +=(self.windowLeftPos - self.xp) / self.options.easingAmount; self.yp +=(self.windowTopPos - self.yp) / self.options.easingAmount; if(self.scrollingLock){ clearInterval(self.loop); self.xp=self.windowLeftPos; self.yp=self.windowTopPos self.xp=((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1); self.yp=(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1)); if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType=="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); }else{ if(self.options.zoomType!="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } /* if(!self.bgxp){self.bgxp=self.largeWidth/self.newvalue;} if(!self.bgyp){self.bgyp=self.largeHeight/self.newvalue ;} if(!self.bgloop){ self.bgloop=setInterval(function(){ self.bgxp +=(self.largeWidth/self.newvalue - self.bgxp) / self.options.easingAmount; self.bgyp +=(self.largeHeight/self.newvalue - self.bgyp) / self.options.easingAmount; self.zoomWindow.css({ "background-size": self.bgxp + 'px ' + self.bgyp + 'px' }); }, 16); } */ self.changeBgSize=false; } self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' }); self.scrollingLock=false; self.loop=false; }else{ if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType=="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); }else{ if(self.options.zoomType!="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.changeBgSize=false; } self.zoomWindow.css({ backgroundPosition: self.xp + 'px ' + self.yp + 'px' }); }}, 16); }}else{ if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType=="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); }else{ if(self.options.zoomType=="lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } if((self.largeHeight/self.newvaluewidth) < self.options.zoomWindowHeight){ self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); }else{ self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); }} self.changeBgSize=false; } self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' }); }} }, setTintPosition: function(e){ var self=this; self.nzOffset=self.$elem.offset(); self.tintpos=String(((e.pageX - self.nzOffset.left)-(self.zoomLens.width() / 2)) * (-1)); self.tintposy=String(((e.pageY - self.nzOffset.top) - self.zoomLens.height() / 2) * (-1)); if(self.Etoppos){ self.tintposy=0; } if(self.Eloppos){ self.tintpos=0; } if(self.Eboppos){ self.tintposy=(self.nzHeight-self.zoomLens.height()-(self.options.lensBorderSize*2))*(-1); } if(self.Eroppos){ self.tintpos=((self.nzWidth-self.zoomLens.width()-(self.options.lensBorderSize*2))*(-1)); } if(self.options.tint){ if(self.fullheight){ self.tintposy=0; } if(self.fullwidth){ self.tintpos=0; } self.zoomTintImage.css({'left': self.tintpos+'px'}); self.zoomTintImage.css({'top': self.tintposy+'px'}); }}, swaptheimage: function(smallimage, largeimage){ var self=this; var newImg=new Image(); if(self.options.loadingIcon){ self.spinner=$('
    '); self.$elem.after(self.spinner); } self.options.onImageSwap(self.$elem); newImg.onload=function(){ self.largeWidth=newImg.width; self.largeHeight=newImg.height; self.zoomImage=largeimage; if(typeof self.zoomWindow=='undefined') return; self.zoomWindow.css({ "background-size": self.largeWidth + 'px ' + self.largeHeight + 'px' }); self.zoomWindow.css({ "background-size": self.largeWidth + 'px ' + self.largeHeight + 'px' }); self.swapAction(smallimage, largeimage); return; } newImg.src=largeimage; }, swapAction: function(smallimage, largeimage){ var self=this; var newImg2=new Image(); newImg2.onload=function(){ self.nzHeight=newImg2.height; self.nzWidth=newImg2.width; self.options.onImageSwapComplete(self.$elem); self.doneCallback(); return; } newImg2.src=smallimage; self.currentZoomLevel=self.options.zoomLevel; self.options.maxZoomLevel=false; if(self.options.zoomType=="lens"){ self.zoomLens.css({ backgroundImage: "url('" + largeimage + "')" }); } if(self.options.zoomType=="window"){ self.zoomWindow.css({ backgroundImage: "url('" + largeimage + "')" }); } if(self.options.zoomType=="inner"){ self.zoomWindow.css({ backgroundImage: "url('" + largeimage + "')" }); } self.currentImage=largeimage; if(self.options.imageCrossfade){ var oldImg=self.$elem; var newImg=oldImg.clone(); self.$elem.attr("src",smallimage) self.$elem.after(newImg); newImg.stop(true).fadeOut(self.options.imageCrossfade, function(){ $(this).remove(); }); self.$elem.width("auto").removeAttr("width"); self.$elem.height("auto").removeAttr("height"); oldImg.fadeIn(self.options.imageCrossfade); if(self.options.tint&&self.options.zoomType!="inner"){ var oldImgTint=self.zoomTintImage; var newImgTint=oldImgTint.clone(); self.zoomTintImage.attr("src",largeimage) self.zoomTintImage.after(newImgTint); newImgTint.stop(true).fadeOut(self.options.imageCrossfade, function(){ $(this).remove(); }); oldImgTint.fadeIn(self.options.imageCrossfade); self.zoomTint.css({ height: self.$elem.height()}); self.zoomTint.css({ width: self.$elem.width()}); } self.zoomContainer.css("height", self.$elem.height()); self.zoomContainer.css("width", self.$elem.width()); if(self.options.zoomType=="inner"){ if(!self.options.constrainType){ self.zoomWrap.parent().css("height", self.$elem.height()); self.zoomWrap.parent().css("width", self.$elem.width()); self.zoomWindow.css("height", self.$elem.height()); self.zoomWindow.css("width", self.$elem.width()); }} if(self.options.imageCrossfade){ self.zoomWrap.css("height", self.$elem.height()); self.zoomWrap.css("width", self.$elem.width()); }}else{ self.$elem.attr("src",smallimage); if(self.options.tint){ self.zoomTintImage.attr("src",largeimage); self.zoomTintImage.attr("height",self.$elem.height()); self.zoomTintImage.css({ height: self.$elem.height()}); self.zoomTint.css({ height: self.$elem.height()}); } self.zoomContainer.css("height", self.$elem.height()); self.zoomContainer.css("width", self.$elem.width()); if(self.options.imageCrossfade){ self.zoomWrap.css("height", self.$elem.height()); self.zoomWrap.css("width", self.$elem.width()); }} if(self.options.constrainType){ if(self.options.constrainType=="height"){ self.zoomContainer.css("height", self.options.constrainSize); self.zoomContainer.css("width", "auto"); if(self.options.imageCrossfade){ self.zoomWrap.css("height", self.options.constrainSize); self.zoomWrap.css("width", "auto"); self.constwidth=self.zoomWrap.width(); }else{ self.$elem.css("height", self.options.constrainSize); self.$elem.css("width", "auto"); self.constwidth=self.$elem.width(); } if(self.options.zoomType=="inner"){ self.zoomWrap.parent().css("height", self.options.constrainSize); self.zoomWrap.parent().css("width", self.constwidth); self.zoomWindow.css("height", self.options.constrainSize); self.zoomWindow.css("width", self.constwidth); } if(self.options.tint){ self.tintContainer.css("height", self.options.constrainSize); self.tintContainer.css("width", self.constwidth); self.zoomTint.css("height", self.options.constrainSize); self.zoomTint.css("width", self.constwidth); self.zoomTintImage.css("height", self.options.constrainSize); self.zoomTintImage.css("width", self.constwidth); }} if(self.options.constrainType=="width"){ self.zoomContainer.css("height", "auto"); self.zoomContainer.css("width", self.options.constrainSize); if(self.options.imageCrossfade){ self.zoomWrap.css("height", "auto"); self.zoomWrap.css("width", self.options.constrainSize); self.constheight=self.zoomWrap.height(); }else{ self.$elem.css("height", "auto"); self.$elem.css("width", self.options.constrainSize); self.constheight=self.$elem.height(); } if(self.options.zoomType=="inner"){ self.zoomWrap.parent().css("height", self.constheight); self.zoomWrap.parent().css("width", self.options.constrainSize); self.zoomWindow.css("height", self.constheight); self.zoomWindow.css("width", self.options.constrainSize); } if(self.options.tint){ self.tintContainer.css("height", self.constheight); self.tintContainer.css("width", self.options.constrainSize); self.zoomTint.css("height", self.constheight); self.zoomTint.css("width", self.options.constrainSize); self.zoomTintImage.css("height", self.constheight); self.zoomTintImage.css("width", self.options.constrainSize); }} }}, doneCallback: function(){ var self=this; if(self.options.loadingIcon){ self.spinner.hide(); } self.nzOffset=self.$elem.offset(); self.nzWidth=self.$elem.width(); self.nzHeight=self.$elem.height(); self.currentZoomLevel=self.options.zoomLevel; self.widthRatio=self.largeWidth / self.nzWidth; self.heightRatio=self.largeHeight / self.nzHeight; if(self.options.zoomType=="window"){ if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight=self.nzHeight; }else{ lensHeight=String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.options.zoomWindowWidth < self.options.zoomWindowWidth){ lensWidth=self.nzWidth; }else{ lensWidth=(self.options.zoomWindowWidth/self.widthRatio); } if(self.zoomLens){ self.zoomLens.css('width', lensWidth); self.zoomLens.css('height', lensHeight); }} }, getCurrentImage: function(){ var self=this; return self.zoomImage; }, getGalleryList: function(){ var self=this; self.gallerylist=[]; if(self.options.gallery){ $('#'+self.options.gallery + ' a').each(function(){ var img_src=''; if($(this).data("zoom-image")){ img_src=$(this).data("zoom-image"); } else if($(this).data("image")){ img_src=$(this).data("image"); } if(img_src==self.zoomImage){ self.gallerylist.unshift({ href: ''+img_src+'', title: $(this).find('img').attr("title") }); }else{ self.gallerylist.push({ href: ''+img_src+'', title: $(this).find('img').attr("title") }); }}); }else{ self.gallerylist.push({ href: ''+self.zoomImage+'', title: $(this).find('img').attr("title") }); } return self.gallerylist; }, changeZoomLevel: function(value){ var self=this; self.scrollingLock=true; self.newvalue=parseFloat(value).toFixed(2); newvalue=parseFloat(value).toFixed(2); maxheightnewvalue=self.largeHeight/((self.options.zoomWindowHeight / self.nzHeight) * self.nzHeight); maxwidthtnewvalue=self.largeWidth/((self.options.zoomWindowWidth / self.nzWidth) * self.nzWidth); if(self.options.zoomType!="inner"){ if(maxheightnewvalue <=newvalue){ self.heightRatio=(self.largeHeight/maxheightnewvalue) / self.nzHeight; self.newvalueheight=maxheightnewvalue; self.fullheight=true; }else{ self.heightRatio=(self.largeHeight/newvalue) / self.nzHeight; self.newvalueheight=newvalue; self.fullheight=false; } if(maxwidthtnewvalue <=newvalue){ self.widthRatio=(self.largeWidth/maxwidthtnewvalue) / self.nzWidth; self.newvaluewidth=maxwidthtnewvalue; self.fullwidth=true; }else{ self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth; self.newvaluewidth=newvalue; self.fullwidth=false; } if(self.options.zoomType=="lens"){ if(maxheightnewvalue <=newvalue){ self.fullwidth=true; self.newvaluewidth=maxheightnewvalue; }else{ self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth; self.newvaluewidth=newvalue; self.fullwidth=false; }}} if(self.options.zoomType=="inner"){ maxheightnewvalue=parseFloat(self.largeHeight/self.nzHeight).toFixed(2); maxwidthtnewvalue=parseFloat(self.largeWidth/self.nzWidth).toFixed(2); if(newvalue > maxheightnewvalue){ newvalue=maxheightnewvalue; } if(newvalue > maxwidthtnewvalue){ newvalue=maxwidthtnewvalue; } if(maxheightnewvalue <=newvalue){ self.heightRatio=(self.largeHeight/newvalue) / self.nzHeight; if(newvalue > maxheightnewvalue){ self.newvalueheight=maxheightnewvalue; }else{ self.newvalueheight=newvalue; } self.fullheight=true; }else{ self.heightRatio=(self.largeHeight/newvalue) / self.nzHeight; if(newvalue > maxheightnewvalue){ self.newvalueheight=maxheightnewvalue; }else{ self.newvalueheight=newvalue; } self.fullheight=false; } if(maxwidthtnewvalue <=newvalue){ self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth; if(newvalue > maxwidthtnewvalue){ self.newvaluewidth=maxwidthtnewvalue; }else{ self.newvaluewidth=newvalue; } self.fullwidth=true; }else{ self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth; self.newvaluewidth=newvalue; self.fullwidth=false; }} scrcontinue=false; if(self.options.zoomType=="inner"){ if(self.nzWidth > self.nzHeight){ if(self.newvaluewidth <=maxwidthtnewvalue){ scrcontinue=true; }else{ scrcontinue=false; self.fullheight=true; self.fullwidth=true; }} if(self.nzHeight > self.nzWidth){ if(self.newvaluewidth <=maxwidthtnewvalue){ scrcontinue=true; }else{ scrcontinue=false; self.fullheight=true; self.fullwidth=true; }} } if(self.options.zoomType!="inner"){ scrcontinue=true; } if(scrcontinue){ self.zoomLock=0; self.changeZoom=true; if(((self.options.zoomWindowHeight)/self.heightRatio) <=self.nzHeight){ self.currentZoomLevel=self.newvalueheight; if(self.options.zoomType!="lens"&&self.options.zoomType!="inner"){ self.changeBgSize=true; self.zoomLens.css({height: String((self.options.zoomWindowHeight)/self.heightRatio) + 'px' }) } if(self.options.zoomType=="lens"||self.options.zoomType=="inner"){ self.changeBgSize=true; }} if((self.options.zoomWindowWidth/self.widthRatio) <=self.nzWidth){ if(self.options.zoomType!="inner"){ if(self.newvaluewidth > self.newvalueheight){ self.currentZoomLevel=self.newvaluewidth; }} if(self.options.zoomType!="lens"&&self.options.zoomType!="inner"){ self.changeBgSize=true; self.zoomLens.css({width: String((self.options.zoomWindowWidth)/self.widthRatio) + 'px' }) } if(self.options.zoomType=="lens"||self.options.zoomType=="inner"){ self.changeBgSize=true; }} if(self.options.zoomType=="inner"){ self.changeBgSize=true; if(self.nzWidth > self.nzHeight){ self.currentZoomLevel=self.newvaluewidth; } if(self.nzHeight > self.nzWidth){ self.currentZoomLevel=self.newvaluewidth; }} } self.setPosition(self.currentLoc); }, closeAll: function(){ if(self.zoomWindow){self.zoomWindow.hide();} if(self.zoomLens){self.zoomLens.hide();} if(self.zoomTint){self.zoomTint.hide();}}, changeState: function(value){ var self=this; if(value=='enable'){self.options.zoomEnabled=true;} if(value=='disable'){self.options.zoomEnabled=false;}} }; $.fn.elevateZoom=function(options){ return this.each(function(){ var elevate=Object.create(ElevateZoom); elevate.init(options, this); $.data(this, 'elevateZoom', elevate); }); }; $.fn.elevateZoom.options={ zoomActivation: "hover", zoomEnabled: true, preloading: 1, zoomLevel: 1, scrollZoom: false, scrollZoomIncrement: 0.1, minZoomLevel: false, maxZoomLevel: false, easing: false, easingAmount: 12, lensSize: 200, zoomWindowWidth: 400, zoomWindowHeight: 400, zoomWindowOffetx: 0, zoomWindowOffety: 0, zoomWindowPosition: 1, zoomWindowBgColour: "#fff", lensFadeIn: false, lensFadeOut: false, debug: false, zoomWindowFadeIn: false, zoomWindowFadeOut: false, zoomWindowAlwaysShow: false, zoomTintFadeIn: false, zoomTintFadeOut: false, borderSize: 4, showLens: true, borderColour: "#888", lensBorderSize: 1, lensBorderColour: "#000", lensShape: "square", zoomType: "window", containLensZoom: false, lensColour: "white", lensOpacity: 0.4, lenszoom: false, tint: false, tintColour: "#333", tintOpacity: 0.4, gallery: false, galleryActiveClass: "zoomGalleryActive", imageCrossfade: false, constrainType: false, constrainSize: false, loadingIcon: false, cursor:"default", responsive:true, onComplete: $.noop, onZoomedImageLoaded: function(){}, onImageSwap: $.noop, onImageSwapComplete: $.noop, zoomContainer: 'body' };})(jQuery, window, document); ;(function (window, document, $, undefined){ "use strict"; var H=$("html"), W=$(window), D=$(document), F=$.fancybox=function (){ F.open.apply(this, arguments); }, IE=navigator.userAgent.match(/msie/i), didUpdate=null, isTouch=document.createTouch!==undefined, isQuery=function(obj){ return obj&&obj.hasOwnProperty&&obj instanceof $; }, isString=function(str){ return str&&$.type(str)==="string"; }, isPercentage=function(str){ return isString(str)&&str.indexOf('%') > 0; }, isScrollable=function(el){ return (el&&!(el.style.overflow&&el.style.overflow==='hidden')&&((el.clientWidth&&el.scrollWidth > el.clientWidth)||(el.clientHeight&&el.scrollHeight > el.clientHeight))); }, getScalar=function(orig, dim){ var value=parseInt(orig, 10)||0; if(dim&&isPercentage(orig)){ value=F.getViewport()[ dim ] / 100 * value; } return Math.ceil(value); }, getValue=function(value, dim){ return getScalar(value, dim) + 'px'; }; $.extend(F, { version: '2.1.5', defaults: { padding:15, margin:20, width:800, height:600, minWidth:100, minHeight:100, maxWidth:9999, maxHeight:9999, pixelRatio: 1, autoSize:true, autoHeight:false, autoWidth:false, autoResize:true, autoCenter:!isTouch, fitToView:true, aspectRatio:false, topRatio:0.5, leftRatio:0.5, scrolling:'auto', // 'auto', 'yes' or 'no' wrapCSS:'', arrows:true, closeBtn:true, closeClick:false, nextClick:false, mouseWheel:true, autoPlay:false, playSpeed:3000, preload:3, modal:false, loop:true, ajax:{ dataType:'html', headers:{ 'X-fancyBox': true }}, iframe:{ scrolling:'auto', preload:true }, swf:{ wmode: 'transparent', allowfullscreen:'true', allowscriptaccess:'always' }, keys:{ next:{ 13:'left', 34:'up', 39:'left', 40:'up' }, prev:{ 8:'right', 33:'down', 37:'right', 38:'down' }, close:[27], play:[32], toggle:[70] }, direction:{ next:'left', prev:'right' }, scrollOutside:true, index:0, type:null, href:null, content:null, title:null, tpl: { wrap:'
    ', image:'', iframe:'', error:'

    The requested content cannot be loaded.
    Please try again later.

    ', closeBtn:'', next:'', prev:'', loading:'
    ' }, openEffect:'fade', // 'elastic', 'fade' or 'none' openSpeed:250, openEasing:'swing', openOpacity:true, openMethod:'zoomIn', closeEffect:'fade', // 'elastic', 'fade' or 'none' closeSpeed:250, closeEasing:'swing', closeOpacity:true, closeMethod:'zoomOut', nextEffect:'elastic', // 'elastic', 'fade' or 'none' nextSpeed:250, nextEasing:'swing', nextMethod:'changeIn', prevEffect:'elastic', // 'elastic', 'fade' or 'none' prevSpeed:250, prevEasing:'swing', prevMethod:'changeOut', helpers:{ overlay:true, title:true }, onCancel:$.noop, beforeLoad:$.noop, afterLoad:$.noop, beforeShow:$.noop, afterShow:$.noop, beforeChange:$.noop, beforeClose:$.noop, afterClose:$.noop }, group:{}, opts:{}, previous:null, coming:null, current:null, isActive:false, isOpen:false, isOpened:false, wrap:null, skin:null, outer:null, inner:null, player:{ timer:null, isActive:false }, ajaxLoad:null, imgPreload:null, transitions:{}, helpers:{}, open: function (group, opts){ if(!group){ return; } if(!$.isPlainObject(opts)){ opts={};} if(false===F.close(true)){ return; } if(!$.isArray(group)){ group=isQuery(group) ? $(group).get():[group]; } $.each(group, function(i, element){ var obj={}, href, title, content, type, rez, hrefParts, selector; if($.type(element)==="object"){ if(element.nodeType){ element=$(element); } if(isQuery(element)){ obj={ href:element.data('fancybox-href')||element.attr('href'), title:$('
    ').text(element.data('fancybox-title')||element.attr('title')||'').html(), isDom:true, element:element }; if($.metadata){ $.extend(true, obj, element.metadata()); }}else{ obj=element; }} href=opts.href||obj.href||(isString(element) ? element:null); title=opts.title!==undefined ? opts.title:obj.title||''; content=opts.content||obj.content; type=content ? 'html':(opts.type||obj.type); if(!type&&obj.isDom){ type=element.data('fancybox-type'); if(!type){ rez=element.prop('class').match(/fancybox\.(\w+)/); type=rez ? rez[1]:null; }} if(isString(href)){ if(!type){ if(F.isImage(href)){ type='image'; }else if(F.isSWF(href)){ type='swf'; }else if(href.charAt(0)==='#'){ type='inline'; }else if(isString(element)){ type='html'; content=element; }} if(type==='ajax'){ hrefParts=href.split(/\s+/, 2); href=hrefParts.shift(); selector=hrefParts.shift(); }} if(!content){ if(type==='inline'){ if(href){ content=$(isString(href) ? href.replace(/.*(?=#[^\s]+$)/, ''):href); }else if(obj.isDom){ content=element; }}else if(type==='html'){ content=href; }else if(!type&&!href&&obj.isDom){ type='inline'; content=element; }} $.extend(obj, { href:href, type:type, content:content, title:title, selector:selector }); group[ i ]=obj; }); F.opts=$.extend(true, {}, F.defaults, opts); if(opts.keys!==undefined){ F.opts.keys=opts.keys ? $.extend({}, F.defaults.keys, opts.keys):false; } F.group=group; return F._start(F.opts.index); }, cancel: function (){ var coming=F.coming; if(coming&&false===F.trigger('onCancel')){ return; } F.hideLoading(); if(!coming){ return; } if(F.ajaxLoad){ F.ajaxLoad.abort(); } F.ajaxLoad=null; if(F.imgPreload){ F.imgPreload.onload=F.imgPreload.onerror=null; } if(coming.wrap){ coming.wrap.stop(true, true).trigger('onReset').remove(); } F.coming=null; if(!F.current){ F._afterZoomOut(coming); }}, close: function (event){ F.cancel(); if(false===F.trigger('beforeClose')){ return; } F.unbindEvents(); if(!F.isActive){ return; } if(!F.isOpen||event===true){ $('.fancybox-wrap').stop(true).trigger('onReset').remove(); F._afterZoomOut(); }else{ F.isOpen=F.isOpened=false; F.isClosing=true; $('.fancybox-item, .fancybox-nav').remove(); F.wrap.stop(true, true).removeClass('fancybox-opened'); F.transitions[ F.current.closeMethod ](); }}, play: function(action){ var clear=function (){ clearTimeout(F.player.timer); }, set=function (){ clear(); if(F.current&&F.player.isActive){ F.player.timer=setTimeout(F.next, F.current.playSpeed); }}, stop=function (){ clear(); D.unbind('.player'); F.player.isActive=false; F.trigger('onPlayEnd'); }, start=function (){ if(F.current&&(F.current.loop||F.current.index < F.group.length - 1)){ F.player.isActive=true; D.bind({ 'onCancel.player beforeClose.player':stop, 'onUpdate.player':set, 'beforeLoad.player':clear }); set(); F.trigger('onPlayStart'); }}; if(action===true||(!F.player.isActive&&action!==false)){ start(); }else{ stop(); }}, next: function(direction){ var current=F.current; if(current){ if(!isString(direction)){ direction=current.direction.next; } F.jumpto(current.index + 1, direction, 'next'); }}, prev: function(direction){ var current=F.current; if(current){ if(!isString(direction)){ direction=current.direction.prev; } F.jumpto(current.index - 1, direction, 'prev'); }}, jumpto: function(index, direction, router){ var current=F.current; if(!current){ return; } index=getScalar(index); F.direction=direction||current.direction[ (index >=current.index ? 'next':'prev') ]; F.router=router||'jumpto'; if(current.loop){ if(index < 0){ index=current.group.length + (index % current.group.length); } index=index % current.group.length; } if(current.group[ index ]!==undefined){ F.cancel(); F._start(index); }}, reposition: function (e, onlyAbsolute){ var current=F.current, wrap=current ? current.wrap:null, pos; if(wrap){ pos=F._getPosition(onlyAbsolute); if(e&&e.type==='scroll'){ delete pos.position; wrap.stop(true, true).animate(pos, 200); }else{ wrap.css(pos); current.pos=$.extend({}, current.dim, pos); }} }, update: function (e){ var type=(e&&e.originalEvent&&e.originalEvent.type), anyway = !type||type==='orientationchange'; if(anyway){ clearTimeout(didUpdate); didUpdate=null; } if(!F.isOpen||didUpdate){ return; } didUpdate=setTimeout(function(){ var current=F.current; if(!current||F.isClosing){ return; } F.wrap.removeClass('fancybox-tmp'); if(anyway||type==='load'||(type==='resize'&¤t.autoResize)){ F._setDimension(); } if(!(type==='scroll'&¤t.canShrink)){ F.reposition(e); } F.trigger('onUpdate'); didUpdate=null; }, (anyway&&!isTouch ? 0:300)); }, toggle: function(action){ if(F.isOpen){ F.current.fitToView=$.type(action)==="boolean" ? action:!F.current.fitToView; if(isTouch){ F.wrap.removeAttr('style').addClass('fancybox-tmp'); F.trigger('onUpdate'); } F.update(); }}, hideLoading: function (){ D.unbind('.loading'); $('#fancybox-loading').remove(); }, showLoading: function (){ var el, viewport; F.hideLoading(); el=$(F.opts.tpl.loading).click(F.cancel).appendTo('body'); D.bind('keydown.loading', function(e){ if((e.which||e.keyCode)===27){ e.preventDefault(); F.cancel(); }}); if(!F.defaults.fixed){ viewport=F.getViewport(); el.css({ position:'absolute', top:(viewport.h * 0.5) + viewport.y, left:(viewport.w * 0.5) + viewport.x }); } F.trigger('onLoading'); }, getViewport: function (){ var locked=(F.current&&F.current.locked)||false, rez={ x: W.scrollLeft(), y: W.scrollTop() }; if(locked&&locked.length){ rez.w=locked[0].clientWidth; rez.h=locked[0].clientHeight; }else{ rez.w=isTouch&&window.innerWidth ? window.innerWidth:W.width(); rez.h=isTouch&&window.innerHeight ? window.innerHeight:W.height(); } return rez; }, unbindEvents: function (){ if(F.wrap&&isQuery(F.wrap)){ F.wrap.unbind('.fb'); } D.unbind('.fb'); W.unbind('.fb'); }, bindEvents: function (){ var current=F.current, keys; if(!current){ return; } W.bind('orientationchange.fb' + (isTouch ? '':' resize.fb') + (current.autoCenter&&!current.locked ? ' scroll.fb':''), F.update); keys=current.keys; if(keys){ D.bind('keydown.fb', function (e){ var code=e.which||e.keyCode, target=e.target||e.srcElement; if(code===27&&F.coming){ return false; } if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey&&!(target&&(target.type||$(target).is('[contenteditable]')))){ $.each(keys, function(i, val){ if(current.group.length > 1&&val[ code ]!==undefined){ F[ i ](val[ code ]); e.preventDefault(); return false; } if($.inArray(code, val) > -1){ F[ i ] (); e.preventDefault(); return false; }}); }}); } if($.fn.mousewheel&¤t.mouseWheel){ F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY){ var target=e.target||null, parent=$(target), canScroll=false; while (parent.length){ if(canScroll||parent.is('.fancybox-skin')||parent.is('.fancybox-wrap')){ break; } canScroll=isScrollable(parent[0]); parent=$(parent).parent(); } if(delta!==0&&!canScroll){ if(F.group.length > 1&&!current.canShrink){ if(deltaY > 0||deltaX > 0){ F.prev(deltaY > 0 ? 'down':'left'); }else if(deltaY < 0||deltaX < 0){ F.next(deltaY < 0 ? 'up':'right'); } e.preventDefault(); }} }); }}, trigger: function (event, o){ var ret, obj=o||F.coming||F.current; if(obj){ if($.isFunction(obj[event])){ ret=obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); } if(ret===false){ return false; } if(obj.helpers){ $.each(obj.helpers, function (helper, opts){ if(opts&&F.helpers[helper]&&$.isFunction(F.helpers[helper][event])){ F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); }}); }} D.trigger(event); }, isImage: function (str){ return isString(str)&&str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); }, isSWF: function (str){ return isString(str)&&str.match(/\.(swf)((\?|#).*)?$/i); }, _start: function (index){ var coming={}, obj, href, type, margin, padding; index=getScalar(index); obj=F.group[ index ]||null; if(!obj){ return false; } coming=$.extend(true, {}, F.opts, obj); margin=coming.margin; padding=coming.padding; if($.type(margin)==='number'){ coming.margin=[margin, margin, margin, margin]; } if($.type(padding)==='number'){ coming.padding=[padding, padding, padding, padding]; } if(coming.modal){ $.extend(true, coming, { closeBtn:false, closeClick:false, nextClick:false, arrows:false, mouseWheel:false, keys:null, helpers: { overlay:{ closeClick:false }} }); } if(coming.autoSize){ coming.autoWidth=coming.autoHeight=true; } if(coming.width==='auto'){ coming.autoWidth=true; } if(coming.height==='auto'){ coming.autoHeight=true; } /* * Add reference to the group, so it`s possible to access from callbacks, example: * afterLoad:function(){ * this.title='Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title:''); * } */ coming.group=F.group; coming.index=index; F.coming=coming; if(false===F.trigger('beforeLoad')){ F.coming=null; return; } type=coming.type; href=coming.href; if(!type){ F.coming=null; if(F.current&&F.router&&F.router!=='jumpto'){ F.current.index=index; return F[ F.router ](F.direction); } return false; } F.isActive=true; if(type==='image'||type==='swf'){ coming.autoHeight=coming.autoWidth=false; coming.scrolling='visible'; } if(type==='image'){ coming.aspectRatio=true; } if(type==='iframe'&&isTouch){ coming.scrolling='scroll'; } coming.wrap=$(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile':'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo(coming.parent||'body'); $.extend(coming, { skin:$('.fancybox-skin', coming.wrap), outer:$('.fancybox-outer', coming.wrap), inner:$('.fancybox-inner', coming.wrap) }); $.each(["Top", "Right", "Bottom", "Left"], function(i, v){ coming.skin.css('padding' + v, getValue(coming.padding[ i ])); }); F.trigger('onReady'); if(type==='inline'||type==='html'){ if(!coming.content||!coming.content.length){ return F._error('content'); }}else if(!href){ return F._error('href'); } if(type==='image'){ F._loadImage(); }else if(type==='ajax'){ F._loadAjax(); }else if(type==='iframe'){ F._loadIframe(); }else{ F._afterLoad(); }}, _error: function(type){ $.extend(F.coming, { type:'html', autoWidth:true, autoHeight:true, minWidth:0, minHeight:0, scrolling:'no', hasError:type, content:F.coming.tpl.error }); F._afterLoad(); }, _loadImage: function (){ var img=F.imgPreload=new Image(); img.onload=function (){ this.onload=this.onerror=null; F.coming.width=this.width / F.opts.pixelRatio; F.coming.height=this.height / F.opts.pixelRatio; F._afterLoad(); }; img.onerror=function (){ this.onload=this.onerror=null; F._error('image'); }; img.src=F.coming.href; if(img.complete!==true){ F.showLoading(); }}, _loadAjax: function (){ var coming=F.coming; F.showLoading(); F.ajaxLoad=$.ajax($.extend({}, coming.ajax, { url: coming.href, error: function (jqXHR, textStatus){ if(F.coming&&textStatus!=='abort'){ F._error('ajax', jqXHR); }else{ F.hideLoading(); }}, success: function (data, textStatus){ if(textStatus==='success'){ coming.content=data; F._afterLoad(); }} })); }, _loadIframe: function(){ var coming=F.coming, iframe=$(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) .attr('scrolling', isTouch ? 'auto':coming.iframe.scrolling) .attr('src', coming.href); $(coming.wrap).bind('onReset', function (){ try { $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); } catch (e){}}); if(coming.iframe.preload){ F.showLoading(); iframe.one('load', function(){ $(this).data('ready', 1); if(!isTouch){ $(this).bind('load.fb', F.update); } $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); F._afterLoad(); }); } coming.content=iframe.appendTo(coming.inner); if(!coming.iframe.preload){ F._afterLoad(); }}, _preloadImages: function(){ var group=F.group, current=F.current, len=group.length, cnt=current.preload ? Math.min(current.preload, len - 1):0, item, i; for (i=1; i <=cnt; i +=1){ item=group[ (current.index + i) % len ]; if(item.type==='image'&&item.href){ new Image().src=item.href; }} }, _afterLoad: function (){ var coming=F.coming, previous=F.current, placeholder='fancybox-placeholder', current, content, type, scrolling, href, embed; F.hideLoading(); if(!coming||F.isActive===false){ return; } if(false===F.trigger('afterLoad', coming, previous)){ coming.wrap.stop(true).trigger('onReset').remove(); F.coming=null; return; } if(previous){ F.trigger('beforeChange', previous); previous.wrap.stop(true).removeClass('fancybox-opened') .find('.fancybox-item, .fancybox-nav') .remove(); } F.unbindEvents(); current=coming; content=coming.content; type=coming.type; scrolling=coming.scrolling; $.extend(F, { wrap:current.wrap, skin:current.skin, outer:current.outer, inner:current.inner, current:current, previous:previous }); href=current.href; switch (type){ case 'inline': case 'ajax': case 'html': if(current.selector){ content=$('
    ').html(content).find(current.selector); }else if(isQuery(content)){ if(!content.data(placeholder)){ content.data(placeholder, $('
    ').insertAfter(content).hide()); } content=content.show().detach(); current.wrap.bind('onReset', function (){ if($(this).find(content).length){ content.hide().replaceAll(content.data(placeholder)).data(placeholder, false); }}); } break; case 'image': content=current.tpl.image.replace(/\{href\}/g, href); break; case 'swf': content=''; embed=''; $.each(current.swf, function(name, val){ content +=''; embed +=' ' + name + '="' + val + '"'; }); content +=''; break; } if(!(isQuery(content)&&content.parent().is(current.inner))){ current.inner.append(content); } F.trigger('beforeShow'); current.inner.css('overflow', scrolling==='yes' ? 'scroll':(scrolling==='no' ? 'hidden':scrolling)); F._setDimension(); F.reposition(); F.isOpen=false; F.coming=null; F.bindEvents(); if(!F.isOpened){ $('.fancybox-wrap').not(current.wrap).stop(true).trigger('onReset').remove(); }else if(previous.prevMethod){ F.transitions[ previous.prevMethod ](); } F.transitions[ F.isOpened ? current.nextMethod:current.openMethod ](); F._preloadImages(); }, _setDimension: function (){ var viewport=F.getViewport(), steps=0, canShrink=false, canExpand=false, wrap=F.wrap, skin=F.skin, inner=F.inner, current=F.current, width=current.width, height=current.height, minWidth=current.minWidth, minHeight=current.minHeight, maxWidth=current.maxWidth, maxHeight=current.maxHeight, scrolling=current.scrolling, scrollOut=current.scrollOutside ? current.scrollbarWidth:0, margin=current.margin, wMargin=getScalar(margin[1] + margin[3]), hMargin=getScalar(margin[0] + margin[2]), wPadding, hPadding, wSpace, hSpace, origWidth, origHeight, origMaxWidth, origMaxHeight, ratio, width_, height_, maxWidth_, maxHeight_, iframe, body; wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); wPadding=getScalar(skin.outerWidth(true) - skin.width()); hPadding=getScalar(skin.outerHeight(true) - skin.height()); wSpace=wMargin + wPadding; hSpace=hMargin + hPadding; origWidth=isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100:width; origHeight=isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100:height; if(current.type==='iframe'){ iframe=current.content; if(current.autoHeight&&iframe&&iframe.data('ready')===1){ try { if(iframe[0].contentWindow.document.location){ inner.width(origWidth).height(9999); body=iframe.contents().find('body'); if(scrollOut){ body.css('overflow-x', 'hidden'); } origHeight=body.outerHeight(true); }} catch (e){}} }else if(current.autoWidth||current.autoHeight){ inner.addClass('fancybox-tmp'); if(!current.autoWidth){ inner.width(origWidth); } if(!current.autoHeight){ inner.height(origHeight); } if(current.autoWidth){ origWidth=inner.width(); } if(current.autoHeight){ origHeight=inner.height(); } inner.removeClass('fancybox-tmp'); } width=getScalar(origWidth); height=getScalar(origHeight); ratio=origWidth / origHeight; minWidth=getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace:minWidth); maxWidth=getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace:maxWidth); minHeight=getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace:minHeight); maxHeight=getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace:maxHeight); origMaxWidth=maxWidth; origMaxHeight=maxHeight; if(current.fitToView){ maxWidth=Math.min(viewport.w - wSpace, maxWidth); maxHeight=Math.min(viewport.h - hSpace, maxHeight); } maxWidth_=viewport.w - wMargin; maxHeight_=viewport.h - hMargin; if(current.aspectRatio){ if(width > maxWidth){ width=maxWidth; height=getScalar(width / ratio); } if(height > maxHeight){ height=maxHeight; width=getScalar(height * ratio); } if(width < minWidth){ width=minWidth; height=getScalar(width / ratio); } if(height < minHeight){ height=minHeight; width=getScalar(height * ratio); }}else{ width=Math.max(minWidth, Math.min(width, maxWidth)); if(current.autoHeight&¤t.type!=='iframe'){ inner.width(width); height=inner.height(); } height=Math.max(minHeight, Math.min(height, maxHeight)); } if(current.fitToView){ inner.width(width).height(height); wrap.width(width + wPadding); width_=wrap.width(); height_=wrap.height(); if(current.aspectRatio){ while ((width_ > maxWidth_||height_ > maxHeight_)&&width > minWidth&&height > minHeight){ if(steps++ > 19){ break; } height=Math.max(minHeight, Math.min(maxHeight, height - 10)); width=getScalar(height * ratio); if(width < minWidth){ width=minWidth; height=getScalar(width / ratio); } if(width > maxWidth){ width=maxWidth; height=getScalar(width / ratio); } inner.width(width).height(height); wrap.width(width + wPadding); width_=wrap.width(); height_=wrap.height(); }}else{ width=Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); height=Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); }} if(scrollOut&&scrolling==='auto'&&height < origHeight&&(width + wPadding + scrollOut) < maxWidth_){ width +=scrollOut; } inner.width(width).height(height); wrap.width(width + wPadding); width_=wrap.width(); height_=wrap.height(); canShrink=(width_ > maxWidth_||height_ > maxHeight_)&&width > minWidth&&height > minHeight; canExpand=current.aspectRatio ? (width < origMaxWidth&&height < origMaxHeight&&width < origWidth&&height < origHeight):((width < origMaxWidth||height < origMaxHeight)&&(width < origWidth||height < origHeight)); $.extend(current, { dim:{ width:getValue(width_), height:getValue(height_) }, origWidth:origWidth, origHeight:origHeight, canShrink:canShrink, canExpand:canExpand, wPadding:wPadding, hPadding:hPadding, wrapSpace:height_ - skin.outerHeight(true), skinSpace:skin.height() - height }); if(!iframe&¤t.autoHeight&&height > minHeight&&height < maxHeight&&!canExpand){ inner.height('auto'); }}, _getPosition: function (onlyAbsolute){ var current=F.current, viewport=F.getViewport(), margin=current.margin, width=F.wrap.width() + margin[1] + margin[3], height=F.wrap.height() + margin[0] + margin[2], rez={ position: 'absolute', top:margin[0], left:margin[3] }; if(current.autoCenter&¤t.fixed&&!onlyAbsolute&&height <=viewport.h&&width <=viewport.w){ rez.position='fixed'; }else if(!current.locked){ rez.top +=viewport.y; rez.left +=viewport.x; } rez.top=getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); rez.left=getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); return rez; }, _afterZoomIn: function (){ var current=F.current; if(!current){ return; } F.isOpen=F.isOpened=true; F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); F.update(); if(current.closeClick||(current.nextClick&&F.group.length > 1)){ F.inner.css('cursor', 'pointer').bind('click.fb', function(e){ if(!$(e.target).is('a')&&!$(e.target).parent().is('a')){ e.preventDefault(); F[ current.closeClick ? 'close':'next' ](); }}); } if(current.closeBtn){ $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e){ e.preventDefault(); F.close(); }); } if(current.arrows&&F.group.length > 1){ if(current.loop||current.index > 0){ $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); } if(current.loop||current.index < F.group.length - 1){ $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); }} F.trigger('afterShow'); if(!current.loop&¤t.index===current.group.length - 1){ F.play(false); }else if(F.opts.autoPlay&&!F.player.isActive){ F.opts.autoPlay=false; F.play(true); }}, _afterZoomOut: function(obj){ obj=obj||F.current; $('.fancybox-wrap').trigger('onReset').remove(); $.extend(F, { group:{}, opts:{}, router:false, current:null, isActive:false, isOpened:false, isOpen:false, isClosing:false, wrap:null, skin:null, outer:null, inner:null }); F.trigger('afterClose', obj); }}); F.transitions={ getOrigPosition: function (){ var current=F.current, element=current.element, orig=current.orig, pos={}, width=50, height=50, hPadding=current.hPadding, wPadding=current.wPadding, viewport=F.getViewport(); if(!orig&¤t.isDom&&element.is(':visible')){ orig=element.find('img:first'); if(!orig.length){ orig=element; }} if(isQuery(orig)){ pos=orig.offset(); if(orig.is('img')){ width=orig.outerWidth(); height=orig.outerHeight(); }}else{ pos.top=viewport.y + (viewport.h - height) * current.topRatio; pos.left=viewport.x + (viewport.w - width) * current.leftRatio; } if(F.wrap.css('position')==='fixed'||current.locked){ pos.top -=viewport.y; pos.left -=viewport.x; } pos={ top:getValue(pos.top - hPadding * current.topRatio), left:getValue(pos.left - wPadding * current.leftRatio), width:getValue(width + wPadding), height:getValue(height + hPadding) }; return pos; }, step: function (now, fx){ var ratio, padding, value, prop=fx.prop, current=F.current, wrapSpace=current.wrapSpace, skinSpace=current.skinSpace; if(prop==='width'||prop==='height'){ ratio=fx.end===fx.start ? 1:(now - fx.start) / (fx.end - fx.start); if(F.isClosing){ ratio=1 - ratio; } padding=prop==='width' ? current.wPadding:current.hPadding; value=now - padding; F.skin[ prop ](getScalar(prop==='width' ? value:value - (wrapSpace * ratio))); F.inner[ prop ](getScalar(prop==='width' ? value:value - (wrapSpace * ratio) - (skinSpace * ratio))); }}, zoomIn: function (){ var current=F.current, startPos=current.pos, effect=current.openEffect, elastic=effect==='elastic', endPos=$.extend({opacity:1}, startPos); delete endPos.position; if(elastic){ startPos=this.getOrigPosition(); if(current.openOpacity){ startPos.opacity=0.1; }}else if(effect==='fade'){ startPos.opacity=0.1; } F.wrap.css(startPos).animate(endPos, { duration:effect==='none' ? 0:current.openSpeed, easing:current.openEasing, step:elastic ? this.step:null, complete:F._afterZoomIn }); }, zoomOut: function (){ var current=F.current, effect=current.closeEffect, elastic=effect==='elastic', endPos={opacity:0.1}; if(elastic){ endPos=this.getOrigPosition(); if(current.closeOpacity){ endPos.opacity=0.1; }} F.wrap.animate(endPos, { duration:effect==='none' ? 0:current.closeSpeed, easing:current.closeEasing, step:elastic ? this.step:null, complete:F._afterZoomOut }); }, changeIn: function (){ var current=F.current, effect=current.nextEffect, startPos=current.pos, endPos={ opacity:1 }, direction=F.direction, distance=200, field; startPos.opacity=0.1; if(effect==='elastic'){ field=direction==='down'||direction==='up' ? 'top':'left'; if(direction==='down'||direction==='right'){ startPos[ field ]=getValue(getScalar(startPos[ field ]) - distance); endPos[ field ]='+=' + distance + 'px'; }else{ startPos[ field ]=getValue(getScalar(startPos[ field ]) + distance); endPos[ field ]='-=' + distance + 'px'; }} if(effect==='none'){ F._afterZoomIn(); }else{ F.wrap.css(startPos).animate(endPos, { duration:current.nextSpeed, easing:current.nextEasing, complete:F._afterZoomIn }); }}, changeOut: function (){ var previous=F.previous, effect=previous.prevEffect, endPos={ opacity:0.1 }, direction=F.direction, distance=200; if(effect==='elastic'){ endPos[ direction==='down'||direction==='up' ? 'top':'left' ]=(direction==='up'||direction==='left' ? '-':'+') + '=' + distance + 'px'; } previous.wrap.animate(endPos, { duration:effect==='none' ? 0:previous.prevSpeed, easing:previous.prevEasing, complete:function (){ $(this).trigger('onReset').remove(); }}); }}; F.helpers.overlay={ defaults:{ closeClick:true, speedOut:200, showEarly:true, css:{}, locked:!isTouch, fixed:true }, overlay:null, fixed:false, el:$('html'), create:function(opts){ var parent; opts=$.extend({}, this.defaults, opts); if(this.overlay){ this.close(); } parent=F.coming ? F.coming.parent:opts.parent; this.overlay=$('
    ').appendTo(parent&&parent.length ? parent:'body'); this.fixed=false; if(opts.fixed&&F.defaults.fixed){ this.overlay.addClass('fancybox-overlay-fixed'); this.fixed=true; }}, open:function(opts){ var that=this; opts=$.extend({}, this.defaults, opts); if(this.overlay){ this.overlay.unbind('.overlay').width('auto').height('auto'); }else{ this.create(opts); } if(!this.fixed){ W.bind('resize.overlay', $.proxy(this.update, this)); this.update(); } if(opts.closeClick){ this.overlay.bind('click.overlay', function(e){ if($(e.target).hasClass('fancybox-overlay')){ if(F.isActive){ F.close(); }else{ that.close(); } return false; }}); } this.overlay.css(opts.css).show(); }, close:function(){ W.unbind('resize.overlay'); if(this.el.hasClass('fancybox-lock')){ $('.fancybox-margin').removeClass('fancybox-margin'); this.el.removeClass('fancybox-lock'); W.scrollTop(this.scrollV).scrollLeft(this.scrollH); } $('.fancybox-overlay').remove().hide(); $.extend(this, { overlay:null, fixed:false }); }, update:function (){ var width='100%', offsetWidth; this.overlay.width(width).height('100%'); if(IE){ offsetWidth=Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); if(D.width() > offsetWidth){ width=D.width(); }}else if(D.width() > W.width()){ width=D.width(); } this.overlay.width(width).height(D.height()); }, onReady:function (opts, obj){ var overlay=this.overlay; $('.fancybox-overlay').stop(true, true); if(!overlay){ this.create(opts); } if(opts.locked&&this.fixed&&obj.fixed){ obj.locked=this.overlay.append(obj.wrap); obj.fixed=false; } if(opts.showEarly===true){ this.beforeShow.apply(this, arguments); }}, beforeShow:function(opts, obj){ if(obj.locked&&!this.el.hasClass('fancybox-lock')){ if(this.fixPosition!==false){ $('*:not(object)').filter(function(){ return ($(this).css('position')==='fixed'&&!$(this).hasClass("fancybox-overlay")&&!$(this).hasClass("fancybox-wrap")); }).addClass('fancybox-margin'); } this.el.addClass('fancybox-margin'); this.scrollV=W.scrollTop(); this.scrollH=W.scrollLeft(); this.el.addClass('fancybox-lock'); W.scrollTop(this.scrollV).scrollLeft(this.scrollH); } this.open(opts); }, onUpdate:function(){ if(!this.fixed){ this.update(); }}, afterClose: function (opts){ if(this.overlay&&!F.coming){ this.overlay.fadeOut(opts.speedOut, $.proxy(this.close, this)); }} }; F.helpers.title={ defaults:{ type:'float', // 'float', 'inside', 'outside' or 'over', position:'bottom' // 'top' or 'bottom' }, beforeShow: function (opts){ var current=F.current, text=current.title, type=opts.type, title, target; if($.isFunction(text)){ text=text.call(current.element, current); } if(!isString(text)||$.trim(text)===''){ return; } title=$('
    ' + text + '
    '); switch (type){ case 'inside': target=F.skin; break; case 'outside': target=F.wrap; break; case 'over': target=F.inner; break; default: // 'float' target=F.skin; title.appendTo('body'); if(IE){ title.width(title.width()); } title.wrapInner(''); F.current.margin[2] +=Math.abs(getScalar(title.css('margin-bottom'))); break; } title[ (opts.position==='top' ? 'prependTo':'appendTo') ](target); }}; $.fn.fancybox=function (options){ var index, that=$(this), selector=this.selector||'', run=function(e){ var what=$(this).blur(), idx=index, relType, relVal; if(!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&!what.is('.fancybox-wrap')){ relType=options.groupAttr||'data-fancybox-group'; relVal=what.attr(relType); if(!relVal){ relType='rel'; relVal=what.get(0)[ relType ]; } if(relVal&&relVal!==''&&relVal!=='nofollow'){ what=selector.length ? $(selector):that; what=what.filter('[' + relType + '="' + relVal + '"]'); idx=what.index(this); } options.index=idx; if(F.open(what, options)!==false){ e.preventDefault(); }} }; options=options||{}; index=options.index||0; if(!selector||options.live===false){ that.unbind('click.fb-start').bind('click.fb-start', run); }else{ D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); } this.filter('[data-fancybox-start=1]').trigger('click'); return this; }; D.ready(function(){ var w1, w2; if($.scrollbarWidth===undefined){ $.scrollbarWidth=function(){ var parent=$('
    ').appendTo('body'), child=parent.children(), width=child.innerWidth() - child.height(99).innerWidth(); parent.remove(); return width; };} if($.support.fixedPosition===undefined){ $.support.fixedPosition=(function(){ var elem=$('
    ').appendTo('body'), fixed=(elem[0].offsetTop===20||elem[0].offsetTop===15); elem.remove(); return fixed; }()); } $.extend(F.defaults, { scrollbarWidth:$.scrollbarWidth(), fixed:$.support.fixedPosition, parent:$('body') }); w1=$(window).width(); H.addClass('fancybox-lock-test'); w2=$(window).width(); H.removeClass('fancybox-lock-test'); $("").appendTo("head"); }); }(window, document, jQuery)); (function($){ $.extend({ browserSelector: function(){ (function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera); var hasTouch='ontouchstart' in window||navigator.msMaxTouchPoints; var u=navigator.userAgent, ua=u.toLowerCase(), is=function (t){ return ua.indexOf(t) > -1; }, g='gecko', w='webkit', s='safari', o='opera', h=document.documentElement, b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua)) ? ('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1])):is('firefox/2') ? g + ' ff2':is('firefox/3.5') ? g + ' ff3 ff3_5':is('firefox/3') ? g + ' ff3':is('gecko/') ? g:is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1:(/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2:'')):is('konqueror') ? 'konqueror':is('chrome') ? w + ' chrome':is('iron') ? w + ' iron':is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1:''):is('mozilla/') ? g:'', is('j2me') ? 'mobile':is('iphone') ? 'iphone':is('ipod') ? 'ipod':is('mac') ? 'mac':is('darwin') ? 'mac':is('webtv') ? 'webtv':is('win') ? 'win':is('freebsd') ? 'freebsd':(is('x11')||is('linux')) ? 'linux':'', 'js']; c=b.join(' '); if($.browser.mobile){ c +=' mobile'; } if(hasTouch){ c +=' touch'; } h.className +=' ' + c; var isIE11 = !(window.ActiveXObject)&&"ActiveXObject" in window; if(isIE11){ $('html').removeClass('gecko').addClass('ie ie11'); return; }} }); $.browserSelector(); })(jQuery); ;(function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery'], factory); }else if(typeof exports==='object'){ module.exports=factory(require('jquery')); }else{ factory(jQuery); }}(function ($){ var eventNamespace='waitForImages'; $.waitForImages={ hasImageProperties: [ 'backgroundImage', 'listStyleImage', 'borderImage', 'borderCornerImage', 'cursor' ], hasImageAttributes: ['srcset'] }; $.expr[':'].uncached=function (obj){ if(!$(obj).is('img[src][src!=""]')){ return false; } return !obj.complete; }; $.fn.waitForImages=function (){ var allImgsLength=0; var allImgsLoaded=0; var deferred=$.Deferred(); var finishedCallback; var eachCallback; var waitForAll; if($.isPlainObject(arguments[0])){ waitForAll=arguments[0].waitForAll; eachCallback=arguments[0].each; finishedCallback=arguments[0].finished; }else{ if(arguments.length===1&&$.type(arguments[0])==='boolean'){ waitForAll=arguments[0]; }else{ finishedCallback=arguments[0]; eachCallback=arguments[1]; waitForAll=arguments[2]; }} finishedCallback=finishedCallback||$.noop; eachCallback=eachCallback||$.noop; waitForAll = !! waitForAll; if(!$.isFunction(finishedCallback)||!$.isFunction(eachCallback)){ throw new TypeError('An invalid callback was supplied.'); } this.each(function (){ var obj=$(this); var allImgs=[]; var hasImgProperties=$.waitForImages.hasImageProperties||[]; var hasImageAttributes=$.waitForImages.hasImageAttributes||[]; var matchUrl=/url\(\s*(['"]?)(.*?)\1\s*\)/g; if(waitForAll){ obj.find('*').addBack().each(function (){ var element=$(this); if(element.is('img:uncached')){ allImgs.push({ src: element.attr('src'), element: element[0] }); } $.each(hasImgProperties, function (i, property){ var propertyValue=element.css(property); var match; if(!propertyValue){ return true; } while (match=matchUrl.exec(propertyValue)){ allImgs.push({ src: match[2], element: element[0] }); }}); $.each(hasImageAttributes, function (i, attribute){ var attributeValue=element.attr(attribute); var attributeValues; if(!attributeValue){ return true; } attributeValues=attributeValue.split(','); $.each(attributeValues, function(i, value){ value=$.trim(value).split(' ')[0]; allImgs.push({ src: value, element: element[0] }); }); }); }); }else{ obj.find('img:uncached') .each(function (){ allImgs.push({ src: this.src, element: this }); }); } allImgsLength=allImgs.length; allImgsLoaded=0; if(allImgsLength===0){ finishedCallback.call(obj[0]); deferred.resolveWith(obj[0]); } $.each(allImgs, function (i, img){ var image=new Image(); var events = 'load.' + eventNamespace + ' error.' + eventNamespace; $(image).one(events, function me (event){ var eachArguments=[ allImgsLoaded, allImgsLength, event.type=='load' ]; allImgsLoaded++; eachCallback.apply(img.element, eachArguments); deferred.notifyWith(img.element, eachArguments); $(this).off(events, me); if(allImgsLoaded==allImgsLength){ finishedCallback.call(obj[0]); deferred.resolveWith(obj[0]); return false; }}); image.src=img.src; }); }); return deferred.promise(); };})); (function (ns){ 'use strict'; var map={ protocol: 'protocol', host: 'hostname', port: 'port', path: 'pathname', query: 'search', hash: 'hash' }; var defaultPorts={ ftp: 21, gopher: 70, http: 80, https: 443, ws: 80, wss: 443 }; function parse (self, url){ var currUrl, link, i, auth; if(typeof document==='undefined'&&typeof require==='function'){ currUrl='file://' + (process.platform.match(/^win/i) ? '/':'') + require('fs').realpathSync('.'); if(url&&url.charAt(0)!=='/'&&!url.match(/^\w+:\/\//)){ url=currUrl + require('path').sep + url; } link=require('url').parse(url||currUrl); }else{ currUrl=document.location.href; link=document.createElement('a'); link.href=url||currUrl; } auth=(url||currUrl).match(/\/\/(.*?)(?::(.*?))?@/)||[]; for (i in map){ self[i]=link[map[i]]||''; } self.protocol=self.protocol.replace(/:$/, ''); self.query=self.query.replace(/^\?/, ''); self.hash=decode(self.hash.replace(/^#/, '')); self.user=decode(auth[1]||''); self.pass=decode(auth[2]||''); self.port=( defaultPorts[self.protocol]==self.port||self.port==0 ) ? '':self.port; if(!self.protocol&&!/^([a-z]+:)?\/\/\/?/.test(url)){ var base=new Url(currUrl.match(/(.*\/)/)[0]); var basePath=base.path.split('/'); var selfPath=self.path.split('/'); var props=['protocol', 'user', 'pass', 'host', 'port']; var s=props.length; basePath.pop(); for (i=0; i < s; i++){ self[props[i]]=base[props[i]]; } while (selfPath[0]=='..'){ basePath.pop(); selfPath.shift(); } self.path = (url.charAt(0)!='/' ? basePath.join('/'):'') + '/' + selfPath.join('/') ; }else{ self.path=self.path.replace(/^\/?/, '/'); } self.paths((self.path.charAt(0)=='/' ? self.path.slice(1):self.path).split('/') ); self.query=new QueryString(self.query); } function encode (s){ return encodeURIComponent(s).replace(/'/g, '%27'); } function decode (s){ s=s.replace(/\+/g, ' '); s=s.replace(/%([ef][0-9a-f])%([89ab][0-9a-f])%([89ab][0-9a-f])/gi, function (code, hex1, hex2, hex3){ var n1=parseInt(hex1, 16) - 0xE0; var n2=parseInt(hex2, 16) - 0x80; if(n1===0&&n2 < 32){ return code; } var n3=parseInt(hex3, 16) - 0x80; var n=(n1 << 12) + (n2 << 6) + n3; if(n > 0xFFFF){ return code; } return String.fromCharCode(n); } ); s=s.replace(/%([cd][0-9a-f])%([89ab][0-9a-f])/gi, function (code, hex1, hex2){ var n1=parseInt(hex1, 16) - 0xC0; if(n1 < 2){ return code; } var n2=parseInt(hex2, 16) - 0x80; return String.fromCharCode((n1 << 6) + n2); } ); return s.replace(/%([0-7][0-9a-f])/gi, function (code, hex){ return String.fromCharCode(parseInt(hex, 16)); } ); } function QueryString (qs){ var re=/([^=&]+)(=([^&]*))?/g; var match; while ((match=re.exec(qs))){ var key=decodeURIComponent(match[1].replace(/\+/g, ' ')); var value=match[3] ? decode(match[3]):''; if(!(this[key]===undefined||this[key]===null)){ if(!(this[key] instanceof Array)){ this[key]=[this[key]]; } this[key].push(value); }else{ this[key]=value; }} } QueryString.prototype.toString=function (){ var s=''; var e=encode; var i, ii; for (i in this){ if(this[i] instanceof Function||this[i]===null){ continue; } if(this[i] instanceof Array){ var len=this[i].length; if(len){ for (ii=0; ii < len; ii++){ s +=s ? '&':''; s +=e(i) + '=' + e(this[i][ii]); }}else{ s +=(s ? '&':'') + e(i) + '='; }}else{ s +=s ? '&':''; s +=e(i) + '=' + e(this[i]); }} return s; }; function Url (url){ parse(this, url); } Url.prototype.clearQuery=function (){ for (var key in this.query){ if(!(this.query[key] instanceof Function)){ delete this.query[key]; }} return this; }; Url.prototype.queryLength=function (){ var count=0; var key; for (key in this){ if(!(this[key] instanceof Function)){ count++; }} return count; }; Url.prototype.isEmptyQuery=function (){ return this.queryLength()===0; }; Url.prototype.paths=function (paths){ var prefix=''; var i=0; var s; if(paths&&paths.length&&paths + ''!==paths){ if(this.isAbsolute()){ prefix='/'; } for (s=paths.length; i < s; i++){ paths[i] = !i&&paths[i].match(/^\w:$/) ? paths[i] : encode(paths[i]); } this.path=prefix + paths.join('/'); } paths=(this.path.charAt(0)==='/' ? this.path.slice(1):this.path).split('/'); for (i=0, s=paths.length; i < s; i++){ paths[i]=decode(paths[i]); } return paths; }; Url.prototype.encode=encode; Url.prototype.decode=decode; Url.prototype.isAbsolute=function (){ return this.protocol||this.path.charAt(0)==='/'; }; Url.prototype.toString=function (){ return ( (this.protocol&&(this.protocol + '://')) + (this.user&&( encode(this.user) + (this.pass&&(':' + encode(this.pass)) ) + '@')) + (this.host&&this.host) + (this.port&&(':' + this.port)) + (this.path&&this.path) + (this.query.toString()&&('?' + this.query)) + (this.hash&&('#' + encode(this.hash))) ); }; ns[ns.exports ? 'exports':'Url']=Url; }(typeof module!=='undefined'&&module.exports ? module:window)); var RtlDetectLib={ _escapeRegExpPattern: function (str){ if(typeof str!=='string'){ return str; } return str.replace(/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g, '\\$1'); }, _toLowerCase: function (str, reserveReturnValue){ if(typeof str!=='string'){ return reserveReturnValue&&str; } return str.toLowerCase(); }, _toUpperCase: function (str, reserveReturnValue){ if(typeof str!=='string'){ return reserveReturnValue&&str; } return str.toUpperCase(); }, _trim: function (str, delimiter, reserveReturnValue){ var patterns=[], self=this, regexp, addPatterns=function (pattern){ patterns.push('^' + pattern + '+|' + pattern + '+$'); }; if(typeof delimiter==='boolean'){ reserveReturnValue=delimiter; delimiter=null; } if(typeof str!=='string'){ return reserveReturnValue&&str; } if(Array.isArray(delimiter)){ delimiter.map(function(item){ var pattern=self._escapeRegExpPattern(item); addPatterns(pattern); }); } if(typeof delimiter==='string'){ var patternDelimiter=self._escapeRegExpPattern(delimiter); addPatterns(patternDelimiter); } if(!delimiter){ addPatterns('\\s'); } var pattern='(' + patterns.join('|') + ')'; regexp=new RegExp(pattern, 'g'); while(str.match(regexp)){ str=str.replace(regexp, ''); } return str; }, _parseLocale:function (strLocale){ var self=this, regex=/^([a-zA-Z]*)([_\-a-zA-Z]*)$/, matches=regex.exec(strLocale), parsedLocale, lang, countryCode; if(!strLocale||!matches){ return; } matches[2]=self._trim(matches[2], ['-', '_']); lang=self._toLowerCase(matches[1]); countryCode=self._toUpperCase(matches[2])||countryCode; parsedLocale={ lang: lang, countryCode: countryCode }; return parsedLocale; }, isRtlLang: function (strLocale){ var self=this, objLocale=self._parseLocale(strLocale); if(!objLocale){ return; } return (self._BIDI_RTL_LANGS.indexOf(objLocale.lang) >=0); }, getLangDir: function (strLocale){ var self=this; return self.isRtlLang(strLocale) ? 'rtl':'ltr'; }}; Object.defineProperty(RtlDetectLib, '_BIDI_RTL_LANGS', { value: [ 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi' ], writable: false, enumerable: true, configurable: false }); (function($){ if(RtlDetectLib.isRtlLang(window.navigator.userLanguage||window.navigator.language)){ $('html').addClass('browser-rtl'); }}).apply(this, [jQuery]); window.theme={}; (function(theme, $){ theme=theme||{}; $.extend(theme, { rtl: js_porto_vars.rtl=='1' ? true:false, rtl_browser: $('html').hasClass('browser-rtl'), ajax_url: js_porto_vars.ajax_url, request_error: js_porto_vars.request_error, change_logo: js_porto_vars.change_logo=='1' ? true:false, show_sticky_header: js_porto_vars.show_sticky_header=='1' ? true:false, show_sticky_header_tablet: js_porto_vars.show_sticky_header_tablet=='1' ? true:false, show_sticky_header_mobile: js_porto_vars.show_sticky_header_mobile=='1' ? true:false, category_ajax: js_porto_vars.category_ajax=='1' ? true:false, prdctfltr_ajax: js_porto_vars.prdctfltr_ajax=='1' ? true:false, show_minicart: js_porto_vars.show_minicart=='1' ? true:false, container_width: parseInt(js_porto_vars.container_width), grid_gutter_width: parseInt(js_porto_vars.grid_gutter_width), screen_lg: parseInt(js_porto_vars.screen_lg), slider_loop: js_porto_vars.slider_loop=='1' ? true:false, slider_autoplay: js_porto_vars.slider_autoplay=='1' ? true:false, slider_autoheight: js_porto_vars.slider_autoheight=='1' ? true:false, slider_speed: js_porto_vars.slider_speed ? js_porto_vars.slider_speed:5000, slider_nav: js_porto_vars.slider_nav=='1' ? true:false, slider_nav_hover: js_porto_vars.slider_nav_hover=='1' ? true:false, slider_margin: js_porto_vars.slider_margin=='1' ? 40:0, slider_dots: js_porto_vars.slider_dots=='1' ? true:false, slider_animatein: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein:'', slider_animateout: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout:'', product_thumbs_count: js_porto_vars.product_thumbs_count ? js_porto_vars.product_thumbs_count:4, product_zoom: js_porto_vars.product_zoom=='1' ? true:false, product_zoom_mobile: js_porto_vars.product_zoom_mobile=='1' ? true:false, product_image_popup: js_porto_vars.product_image_popup=='1' ? 'fadeOut':false, hoverIntentConfig: { sensitivity: 2, interval: 0, timeout: 0 }, owlConfig: { rtl: js_porto_vars.rtl=='1' ? true:false, loop:js_porto_vars.slider_loop=='1' ? true:false, autoplay:js_porto_vars.slider_autoplay=='1' ? true:false, autoHeight:js_porto_vars.slider_autoheight=='1' ? true:false, autoplayTimeout: js_porto_vars.slider_speed ? js_porto_vars.slider_speed:5000, autoplayHoverPause:true, lazyLoad: true, nav: js_porto_vars.slider_nav=='1' ? true:false, navText: ["", ""], dots: js_porto_vars.slider_dots=='1' ? true:false, stagePadding: (js_porto_vars.slider_nav_hover!='1'&&js_porto_vars.slider_margin=='1') ? 40:0, animateOut: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout:'', animateIn: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein:'' }, mfpConfig: { tClose: js_porto_vars.popup_close, tLoading: '
    ', gallery: { tPrev: js_porto_vars.popup_prev, tNext: js_porto_vars.popup_next, tCounter: js_porto_vars.mfp_counter }, image: { tError: js_porto_vars.mfp_img_error }, ajax: { tError: js_porto_vars.mfp_ajax_error }, callbacks: { open: function(){ $('body').addClass('lightbox-opened'); var fixed=this.st.fixedContentPos; if(fixed){ $('#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap').css(theme.rtl_browser?'left':'right', theme.getScrollbarWidth()); } var that=$(this._lastFocusedEl); if(( that.closest('.portfolios-lightbox').hasClass('with-thumbs'))&&$(document).width() >=1024){ var portfolio_lightbox_thumbnails_base=that.closest('.portfolios-lightbox.with-thumbs').find('.porto-portfolios-lighbox-thumbnails').clone(), magnificPopup=$.magnificPopup.instance; $('body').prepend(portfolio_lightbox_thumbnails_base); var $portfolios_lightbox_thumbnails=$('body > .porto-portfolios-lighbox-thumbnails'), $portfolios_lightbox_thumbnails_carousel=$portfolios_lightbox_thumbnails.children('.owl-carousel'); $portfolios_lightbox_thumbnails_carousel.themeCarousel($portfolios_lightbox_thumbnails_carousel.data('plugin-options')); $portfolios_lightbox_thumbnails_carousel.trigger('refresh.owl.carousel'); var $carousel_items_wrapper=$portfolios_lightbox_thumbnails_carousel.find('.owl-stage'); $carousel_items_wrapper.find('.owl-item').removeClass('current'); $carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current'); $.magnificPopup.instance.next=function(){ var magnificPopup=$.magnificPopup.instance; $.magnificPopup.proto.next.call(this); $carousel_items_wrapper.find('.owl-item').removeClass('current'); $carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current'); }; $.magnificPopup.instance.prev=function(){ var magnificPopup=$.magnificPopup.instance; $.magnificPopup.proto.prev.call(this); $carousel_items_wrapper.find('.owl-item').removeClass('current'); $carousel_items_wrapper.find('.owl-item').eq(magnificPopup.currItem.index).addClass('current'); }; $carousel_items_wrapper.find('.owl-item').on('click', function(){ $carousel_items_wrapper.find('.owl-item').removeClass('current'); $.magnificPopup.instance.goTo($(this).index()); $(this).addClass('current'); }); } }, close: function(){ $('body').removeClass('lightbox-opened'); var fixed=this.st.fixedContentPos; if(fixed){ $('#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap').css(theme.rtl_browser?'left':'right', ''); } $('.owl-carousel .owl-stage').each(function(){ var $this=$(this), w=$this.width() + parseInt($this.css('padding-left')) + parseInt($this.css('padding-right')); $this.css({'width': w + 200}); setTimeout(function(){ $this.css({'width': w}); }, 0); }); var that=$(this._lastFocusedEl); if(( that.parents('.portfolios-lightbox').hasClass('with-thumbs'))&&$(document).width() >=1024){ $(' body > .porto-portfolios-lighbox-thumbnails').remove(); } }} }, sticky_nav_height: 0, getScrollbarWidth: function(){ if(this.scrollbarSize===undefined){ var scrollDiv=document.createElement("div"); scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; document.body.appendChild(scrollDiv); this.scrollbarSize=scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } return this.scrollbarSize; }, isTablet: function(){ if($(window).width() < 992 - theme.getScrollbarWidth()) return true; return false; }, isMobile: function(){ if($(window).width() <=480 - theme.getScrollbarWidth()) return true; return false; }, refreshVCContent: function($elements){ if($elements){ $(window).trigger('resize'); } theme.refreshStickySidebar(true); if(typeof window.vc_js=='function') window.vc_js(); $(document.body).trigger('porto_refresh_vc_content', [$elements]); }, adminBarHeight: function(){ var $admin_bar=$('#wpadminbar'), adminbar_height=0; if($admin_bar.get(0)&&$admin_bar.is(':visible')){ adminbar_height=$('#wpadminbar').css('position')=='fixed' ? $('#wpadminbar').height():0; } return parseInt(adminbar_height); }, refreshStickySidebar: function(timeout){ var $sticky_sidebar=$('.sidebar [data-plugin-sticky]'); if($sticky_sidebar.get(0)){ if(timeout){ setTimeout(function(){ $sticky_sidebar.trigger('recalc.pin'); }, 400); }else{ $sticky_sidebar.trigger('recalc.pin'); }} }, scrolltoContainer: function($container){ if($container.get(0)){ var winWidth=$(window).width(); if(winWidth <=991 - theme.getScrollbarWidth()){ $('.sidebar-overlay').click(); } $('html, body').stop().animate({ scrollTop: $container.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 18 }, 600, 'easeOutQuad'); }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__accordion'; var Accordion=function($el, opts){ return this.initialize($el, opts); }; Accordion.defaults={ }; Accordion.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, Accordion.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.collapse))){ return this; } var self=this, $el=this.options.wrapper, $collapse=$el.find('.collapse'), collapsible=$el.data('collapsible'), active_num=$el.data('active-tab'); if($collapse.length > 0){ if(collapsible=='yes'){ $collapse.collapse({toggle: false, parent: '#' + $el.attr('id')}); }else if(!isNaN(active_num)&&active_num==parseInt(active_num)&&$el.find('.collapse').length > active_num){ $el.find('.collapse').collapse({toggle: false, parent: '#' + $el.attr('id')}); $el.find('.collapse').eq(active_num-1).collapse('toggle'); }else{ $el.find('.collapse').collapse({parent: '#' + $el.attr('id')}); }} return this; }}; $.extend(theme, { Accordion: Accordion }); $.fn.themeAccordion=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.Accordion($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__accordionMenu'; var AccordionMenu=function($el, opts){ return this.initialize($el, opts); }; AccordionMenu.defaults={ }; AccordionMenu.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, AccordionMenu.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper; $el.find('li.menu-item.active').each(function(){ var $this=$(this); if($this.find('> .arrow').get(0)) $this.find('> .arrow').click(); }); $el.find('.arrow').click(function(){ var $this=$(this), $parent=$this.closest('li'); if(typeof self.options.open_one!='undefined'){ $parent.siblings('.open').children('.arrow').next().hide(); $parent.siblings('.open').removeClass('open'); $this.next().stop().toggle(); }else{ $this.next().stop().slideToggle(); } if($parent.hasClass('open')){ $parent.removeClass('open'); }else{ $parent.addClass('open'); }}); return this; }}; $.extend(theme, { AccordionMenu: AccordionMenu }); $.fn.themeAccordionMenu=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.AccordionMenu($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__animate'; var Animate=function($el, opts){ return this.initialize($el, opts); }; Animate.defaults={ accX: 0, accY: -150, delay: 1, duration: 1000 }; Animate.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, Animate.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper, delay=0, duration=0; $el.addClass('appear-animation'); if(!$('html').hasClass('no-csstransitions')&&$(window).width() > (767 - theme.getScrollbarWidth())&&$.isFunction($.fn.appear)){ $el.appear(function(){ delay=Math.abs($el.attr('data-appear-animation-delay') ? $el.attr('data-appear-animation-delay'):self.options.delay); if(delay > 1){ $el.css('animation-delay', delay + 'ms'); } duration=Math.abs($el.attr('data-appear-animation-duration') ? $el.attr('data-appear-animation-duration'):self.options.duration); if(duration!=1000){ $el.css('animation-duration', duration + 'ms'); } $el.addClass($el.attr('data-appear-animation')); setTimeout(function(){ $el.addClass('appear-animation-visible'); }, delay); }, { accX: self.options.accX, accY: self.options.accY }); }else{ $el.addClass('appear-animation-visible'); } return this; }}; $.extend(theme, { Animate: Animate }); $.fn.themeAnimate=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.Animate($this, opts); }}); };}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__carousel'; var Carousel=function($el, opts){ return this.initialize($el, opts); }; Carousel.defaults=$.extend({}, { loop: true, navText: [], themeConfig: false, lazyLoad: true, lg: 0, md: 0, sm: 0, xs: 0, responsive: {}, single: false, rtl: theme.rtl }); var scrollWidth=theme.getScrollbarWidth(), w_sm=576 - scrollWidth, w_md=768 - scrollWidth, w_lg=992 - scrollWidth, w_xl=theme.screen_lg - scrollWidth, w_sl=1400 - scrollWidth; Carousel.defaults.responsive[0]={items: 1}; Carousel.defaults.responsive[w_sm]={items: 1, mergeFit: false}; Carousel.defaults.responsive[w_md]={items: 1, mergeFit: false}; Carousel.defaults.responsive[w_lg]={items: 1, mergeFit: false}; Carousel.defaults.responsive[w_xl]={items: 1, mergeFit: false}; Carousel.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ if((opts&&opts.themeConfig)||!opts){ this.options=$.extend(true, {}, Carousel.defaults, theme.owlConfig, opts, { wrapper: this.$el, themeConfig: true }); }else{ this.options=$.extend(true, {}, Carousel.defaults, opts, { wrapper: this.$el }); } return this; }, build: function(){ if(!($.isFunction($.fn.owlCarousel))){ return this; } var self=this, $el=this.options.wrapper, loop=this.options.loop, lg=this.options.lg ? this.options.lg:this.options.items, md=this.options.md ? this.options.md:this.options.items, sm=this.options.sm ? this.options.sm:this.options.items, xs=this.options.xs ? this.options.xs:this.options.items, single=this.options.single, zoom=$el.find('.zoom').get(0), responsive={}, items, count=$el.find('> *').length, fullscreen=typeof this.options.fullscreen=='undefined' ? false:this.options.fullscreen; if(fullscreen){ $el.children().width($(window).width()); $el.children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height():$(window).height()); $el.children().css('max-height', '100%'); $(window).resize(function(){ $el.find('.owl-item').children().width($(window).width()); $el.find('.owl-item').children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height():$(window).height()); $el.find('.owl-item').children().css('max-height', '100%'); }); } if(single){ items=1; }else{ items=this.options.items ? this.options.items:(lg ? lg:1); if(this.options.xl){ responsive[w_sl]={ items: this.options.xl, loop: (loop&&count > this.options.xl) ? true:false, mergeFit: this.options.mergeFit };} responsive[w_xl]={ items: items, loop: (loop&&count > items) ? true:false, mergeFit: this.options.mergeFit }; if(lg) responsive[w_lg]={ items: lg, loop: (loop&&count > lg) ? true:false, mergeFit: this.options.mergeFit_lg }; if(md) responsive[w_md]={ items: md, loop: (loop&&count > md) ? true:false, mergeFit: this.options.mergeFit_md }; if(sm) responsive[w_sm]={ items: sm, loop: (loop&&count > sm) ? true:false, mergeFit: this.options.mergeFit_sm }; if(xs) responsive[0]={ items: xs, loop: (loop&&count > xs) ? true:false, mergeFit: this.options.mergeFit_xs };} if(!$el.hasClass('show-nav-title')&&this.options.themeConfig&&theme.slider_nav&&theme.slider_nav_hover) $el.addClass('show-nav-hover'); this.options=$.extend(true, {}, this.options, { items: items, loop: (loop&&count > items) ? true:false, responsive: responsive, onInitialized: function(){ $el.find('.owl-stage-outer').css({ 'margin-left': this.options.stagePadding, 'margin-right': this.options.stagePadding }); if($el.hasClass('show-dots-title')&&($el.prev('.porto-u-heading, .vc_custom_heading, .slider-title').length||$el.closest('.slider-wrapper').prev('.porto-u-heading, .vc_custom_heading, .slider-title').length||$el.closest('.porto-recent-posts').prev('.porto-u-heading, .vc_custom_heading, .slider-title').length)){ var $obj=$el.prev('.porto-u-heading, .vc_custom_heading, .slider-title'); if(!$obj.length){ $obj=$el.closest('.slider-wrapper').prev('.porto-u-heading, .vc_custom_heading, .slider-title'); } if(!$obj.length){ $obj=$el.closest('.porto-recent-posts').prev('.porto-u-heading, .vc_custom_heading, .slider-title'); } try { var innerWidth=$obj.css('display', 'inline-block').width(); $obj.css('display', ''); if(innerWidth + 15 + $el.find('.owl-dots').width() <=$obj.width()){ $el.find('.owl-dots').css('left', innerWidth + 15 + ($el.width() - $obj.width()) / 2); $el.find('.owl-dots').css('top', -1 * $obj.height() / 2 - parseInt($obj.css('margin-bottom')) - $el.find('.owl-dots').height() / 2 + 2); }else{ $el.find('.owl-dots').css('position', 'static'); }} catch(e){}} }, touchDrag: (count==1) ? false:true, mouseDrag: (count==1) ? false:true }); if(this.options.autoHeight){ function calcOwlHeight(){ var h=0; $el.find('.owl-item.active').each(function(){ if(h < $(this).height()) h=$(this).height(); }); $el.find('.owl-stage-outer').height(h); } $(window).on('resize', function(){ calcOwlHeight(); }); $(window).on('load', function(){ calcOwlHeight(); }); } if(zoom){ var links=[], i=0; $el.find('.zoom').each(function(){ var slide={}, $zoom=$(this); slide.src=$zoom.data('src'); slide.title=$zoom.data('title'); links[i]=slide; $zoom.data('index', i); i++; }); } if($el.hasClass('show-nav-title')){ this.options.stagePadding=0; }else{ if(this.options.themeConfig&&theme.slider_nav&&theme.slider_nav_hover) $el.addClass('show-nav-hover'); if(this.options.themeConfig&&!theme.slider_nav_hover&&theme.slider_margin) $el.addClass('stage-margin'); } $el.owlCarousel(this.options); if(zoom&&links){ $el.on('click', '.zoom', function(e){ e.preventDefault(); $.magnificPopup.close(); $.magnificPopup.open($.extend(true, {}, theme.mfpConfig, { items: links, gallery: { enabled: true }, type: 'image' }), $(this).data('index')); return false; }); } return this; }}; $.extend(theme, { Carousel: Carousel }); $.fn.themeCarousel=function(opts, zoom){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.Carousel($this, opts, zoom); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__chartCircular'; var ChartCircular=function($el, opts){ return this.initialize($el, opts); }; ChartCircular.defaults={ accX: 0, accY: -150, delay: 1, barColor: '#0088CC', trackColor: '#f2f2f2', scaleColor: false, scaleLength: 5, lineCap: 'round', lineWidth: 13, size: 175, rotate: 0, animate: ({ duration: 2500, enabled: true }) }; ChartCircular.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, ChartCircular.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.appear))||!($.isFunction($.fn.easyPieChart))){ return this; } var self=this, $el=this.options.wrapper, value=($el.attr('data-percent') ? $el.attr('data-percent'):0), percentEl=$el.find('.percent'); if(!value) value=1; var labelValue=this.options.labelValue ? this.options.labelValue:value; $.extend(true, self.options, { onStep: function(from, to, currentValue){ percentEl.html(parseInt(labelValue * currentValue / value)); }}); $el.attr('data-percent', 0); $el.appear(function(){ $el.easyPieChart(self.options); setTimeout(function(){ $el.data('easyPieChart').update(value); $el.attr('data-percent', value); }, self.options.delay); }, { accX: self.options.accX, accY: self.options.accY }); return this; }}; $.extend(theme, { ChartCircular: ChartCircular }); $.fn.themeChartCircular=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.ChartCircular($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__fitVideo'; var FitVideo=function($el, opts){ return this.initialize($el, opts); }; FitVideo.defaults={ }; FitVideo.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, FitVideo.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.fitVids))){ return this; } var self=this, $el=this.options.wrapper; $el.fitVids(); $(window).on('resize', function(){ $el.fitVids(); }); return this; }}; $.extend(theme, { FitVideo: FitVideo }); $.fn.themeFitVideo=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.FitVideo($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__videobackground'; var PluginVideoBackground=function($el, opts){ return this.initialize($el, opts); }; PluginVideoBackground.defaults={ overlay: true, volume: 1, playbackRate: 1, muted: true, loop: true, autoplay: true, position: '50% 50%', posterType: 'detect' }; PluginVideoBackground.prototype={ initialize: function($el, opts){ this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, PluginVideoBackground.defaults, opts, { path: this.$el.data('video-path'), wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.vide))||(!this.options.path)){ return this; } if(this.options.overlay){ this.options.wrapper.prepend($('
    ').addClass('video-overlay') ); } this.options.wrapper.vide(this.options.path, this.options); return this; }}; $.extend(theme, { PluginVideoBackground: PluginVideoBackground }); $.fn.themePluginVideoBackground=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new PluginVideoBackground($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__wordRotate'; var PluginWordRotate=function($el, opts){ return this.initialize($el, opts); }; PluginWordRotate.defaults={ delay: 2000, animDelay: 500, pauseOnHover: true, }; PluginWordRotate.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this.setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, PluginWordRotate.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper, itemsWrapper=$el.find(".word-rotate-items"), items=itemsWrapper.find("> span"), firstItem=items.eq(0), firstItemClone=firstItem.clone().removeClass('active'), currentItem=1, currentTop=0, itemWidth=0, intervalId=null; itemsWrapper .width(firstItem.width() + "px") .append(firstItemClone); var setTimer=function(){ currentTop=(currentItem * $el.height()); currentItem++; items.removeClass('active').addClass('inactive'); if(currentItem <=items.length){ itemWidth=items.eq(currentItem-1).width(); items.eq(currentItem-1).removeClass('inactive').addClass('active'); }else{ itemWidth=items.eq(0).width(); items.eq(0).removeClass('inactive').addClass('active'); } itemsWrapper.animate({ top: -(currentTop) + "px", width: itemWidth + "px" }, self.options.animDelay, "easeOutQuad", function(){ if(currentItem > items.length){ itemsWrapper.css("top", 0); currentItem=1; }}); }; if(self.options.pauseOnHover){ itemsWrapper.hover(function(){ if(intervalId!=null){ clearInterval(intervalId); }}, function(){ intervalId=setInterval(setTimer, self.options.delay); } ); } $el.addClass("active"); intervalId=setInterval(setTimer, self.options.delay); return this; }}; $.extend(theme, { PluginWordRotate: PluginWordRotate }); $.fn.themePluginWordRotate=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new PluginWordRotate($this, opts); }}); }}).apply(this, [ window.theme, jQuery ]); (function(theme, $){ theme=theme||{}; var instanceName='__flickrZoom'; var FlickrZoom=function($el, opts){ return this.initialize($el, opts); }; FlickrZoom.defaults={ }; FlickrZoom.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, FlickrZoom.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper, links=[], i=0, $flickr_links=$el.find('.flickr_badge_image > a'); $flickr_links.each(function(){ var slide={}, $image=$(this).find('> img'); slide.src=$image.attr('src').replace('_s.', '_b.'); slide.title=$image.attr('title'); links[i]=slide; i++; }); $flickr_links.click(function(e){ e.preventDefault(); $.magnificPopup.close(); $.magnificPopup.open($.extend(true, {}, theme.mfpConfig, { items: links, gallery: { enabled: true }, type: 'image' }), $flickr_links.index($(this))); }); return this; }}; $.extend(theme, { FlickrZoom: FlickrZoom }); $.fn.themeFlickrZoom=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.FlickrZoom($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__lazyload'; var PluginLazyLoad=function($el, opts){ return this.initialize($el, opts); }; PluginLazyLoad.defaults={ effect: 'show', appearEffect: '', appear: function(elements_left, settings){ }, load: function(elements_left, settings){ $(this).addClass($.trim('lazy-load-loaded ' + settings.appearEffect)); }}; PluginLazyLoad.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, PluginLazyLoad.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.lazyload))){ return this; } var self=this; self.options.wrapper.lazyload(this.options); return this; }}; $.extend(theme, { PluginLazyLoad: PluginLazyLoad }); $.fn.themePluginLazyLoad=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new PluginLazyLoad($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__lightbox'; var Lightbox=function($el, opts){ return this.initialize($el, opts); }; Lightbox.defaults={ callbacks: { open: function(){ $('body').addClass('lightbox-opened'); }, close: function(){ $('body').removeClass('lightbox-opened'); }} }; Lightbox.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, Lightbox.defaults, theme.mfpConfig, opts, { wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.magnificPopup))){ return this; } this.options.wrapper.magnificPopup(this.options); return this; }}; $.extend(theme, { Lightbox: Lightbox }); $.fn.themeLightbox=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.Lightbox($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ 'use strict'; theme=theme||{}; var loadingOverlayTemplate=[ '
    ', '
    ', '
    ' ].join(''); var LoadingOverlay=function($wrapper, options){ return this.initialize($wrapper, options); }; LoadingOverlay.prototype={ options: { css: {}}, initialize: function($wrapper, options){ this.$wrapper=$wrapper; this .setVars() .setOptions(options) .build() .events(); this.$wrapper.data('loadingOverlay', this); }, setVars: function(){ this.$overlay=this.$wrapper.find('.loading-overlay'); return this; }, setOptions: function(options){ if(!this.$overlay.get(0)){ this.matchProperties(); } this.options=$.extend(true, {}, this.options, options); this.loaderClass=this.getLoaderClass(this.options.css.backgroundColor); return this; }, build: function(){ if(!this.$overlay.closest(document.documentElement).get(0)){ if(!this.$cachedOverlay){ this.$overlay=$(loadingOverlayTemplate).clone(); if(this.options.css){ this.$overlay.css(this.options.css); this.$overlay.find('.loader').addClass(this.loaderClass); }}else{ this.$overlay=this.$cachedOverlay.clone(); } this.$wrapper.append(this.$overlay); } if(!this.$cachedOverlay){ this.$cachedOverlay=this.$overlay.clone(); } return this; }, events: function(){ var _self=this; if(this.options.startShowing){ _self.show(); } if(this.$wrapper.is('body')||this.options.hideOnWindowLoad){ $(window).on('load error', function(){ _self.hide(); }); } if(this.options.listenOn){ $(this.options.listenOn) .on('loading-overlay:show beforeSend.ic', function(e){ e.stopPropagation(); _self.show(); }) .on('loading-overlay:hide complete.ic', function(e){ e.stopPropagation(); _self.hide(); }); } this.$wrapper .on('loading-overlay:show beforeSend.ic', function(e){ e.stopPropagation(); _self.show(); }) .on('loading-overlay:hide complete.ic', function(e){ e.stopPropagation(); _self.hide(); }); return this; }, show: function(){ this.build(); this.position=this.$wrapper.css('position').toLowerCase(); if(this.position!='relative'||this.position!='absolute'||this.position!='fixed'){ this.$wrapper.css({ position: 'relative' }); } this.$wrapper.addClass('loading-overlay-showing'); }, hide: function(){ var _self=this; this.$wrapper.removeClass('loading-overlay-showing'); setTimeout(function(){ if(this.position!='relative'||this.position!='absolute'||this.position!='fixed'){ _self.$wrapper.css({ position: '' }); }}, 500); }, matchProperties: function(){ var i, l, properties; properties=[ 'backgroundColor', 'borderRadius' ]; l=properties.length; for(i=0; i < l; i++){ var obj={}; obj[ properties[ i ] ]=this.$wrapper.css(properties[ i ]); $.extend(this.options.css, obj); }}, getLoaderClass: function(backgroundColor){ if(!backgroundColor||backgroundColor==='transparent'||backgroundColor==='inherit'){ return 'black'; } var hexColor, r, g, b, yiq; var colorToHex=function(color){ var hex, rgb; if(color.indexOf('#') >- 1){ hex=color.replace('#', ''); }else{ rgb=color.match(/\d+/g); hex=('0' + parseInt(rgb[0], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[1], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[2], 10).toString(16)).slice(-2); } if(hex.length===3){ hex=hex + hex; } return hex; }; hexColor=colorToHex(backgroundColor); r=parseInt(hexColor.substr(0, 2), 16); g=parseInt(hexColor.substr(2, 2), 16); b=parseInt(hexColor.substr(4, 2), 16); yiq=((r * 299) + (g * 587) + (b * 114)) / 1000; return(yiq >=128) ? 'black':'white'; }}; $.extend(theme, { LoadingOverlay: LoadingOverlay }); $.fn.loadingOverlay=function(opts){ return this.each(function(){ var $this=$(this); var loadingOverlay=$this.data('loadingOverlay'); if(loadingOverlay){ return loadingOverlay; }else{ var options=opts||$this.data('loading-overlay-options')||{}; return new LoadingOverlay($this, options); }}); } $(function(){ $('[data-loading-overlay]').loadingOverlay(); }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__masonry'; var Masonry=function($el, opts){ return this.initialize($el, opts); }; Masonry.defaults={ itemSelector: 'li', isOriginLeft:!theme.rtl }; Masonry.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, Masonry.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.isotope))){ return this; } var self=this, $el=this.options.wrapper; $el.isotope(this.options); if(this.options.callback){ $el.isotope('on', 'layoutComplete', function(){ if(typeof this.options.callback=='function'){ this.options.callback.call(); } $el.find('.porto-lazyload:not(.lazy-load-loaded)').trigger('appear'); }); } $el.isotope('layout'); self.resize(); $(window).on('resize', function(){ self.resize() }); return this; }, resize: function(){ var self=this, $el=this.options.wrapper; if(self.resizeTimer) clearTimeout(self.resizeTimer); self.resizeTimer=setTimeout(function(){ if($el.data('isotope')){ $el.isotope('layout'); } delete self.resizeTimer; }, 600); }}; $.extend(theme, { Masonry: Masonry }); $.fn.themeMasonry=function(opts){ return this.map(function(){ var $this=$(this); $this.waitForImages(function(){ if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.Masonry($this, opts); }}); }); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__previewImage'; var PreviewImage=function($el, opts){ return this.initialize($el, opts); }; PreviewImage.defaults={ }; PreviewImage.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, PreviewImage.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper, image=$el.data('image'); if(image){ $el.css('background-image', 'url(' + image + ')'); } return this; }}; $.extend(theme, { PreviewImage: PreviewImage }); $.fn.themePreviewImage=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.PreviewImage($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__refreshVideoSize'; var RefreshVideoSize=function($el, opts){ return this.initialize($el, opts); }; RefreshVideoSize.defaults={ }; RefreshVideoSize.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, RefreshVideoSize.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, resizeTimer=false; setTimeout(function(){ self.refresh(); }, 100); $(window).on('resize', function(){ if(resizeTimer){ clearTimeout(resizeTimer); } resizeTimer=setTimeout(function(){ self.refresh(); }, 100); }); return this; }, refresh: function(){ var self=this, $el=this.options.wrapper, $video=$el.find('video'), w=$el.width(), h=$el.height(); if(!$video.get(0)){ return; } $video.css('width', '100%').css('height', 'auto'); var vw=$video.width(), vh=$video.height(); if(vh < h){ $video.css('height', h); $video.css('width', h / vh * 100 + '%'); } return this; }}; $.extend(theme, { RefreshVideoSize: RefreshVideoSize }); $.fn.themeRefreshVideoSize=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.RefreshVideoSize($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__toggle'; var Toggle=function($el, opts){ return this.initialize($el, opts); }; Toggle.defaults={ }; Toggle.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, Toggle.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper; if($el.hasClass('active')) $el.find("> div.toggle-content").stop().slideDown(350, function(){ $(this).attr('style', '').show(); }); $el.on('click', "> label", function(e){ var parentSection=$(this).parent(), parentWrapper=$(this).closest("div.toogle"), parentToggles=$(this).closest(".porto-toggles"), isAccordion=parentWrapper.hasClass("toogle-accordion"), toggleContent=parentSection.find("> div.toggle-content"); if(isAccordion&&typeof(e.originalEvent)!="undefined"){ parentWrapper.find("section.toggle.active > label").trigger("click"); } if(!parentSection.hasClass("active")){ if(parentToggles.length){ if(parentToggles.data('view')=='one-toggle'){ parentToggles.find('.toggle').each(function(){ $(this).removeClass('active'); $(this).find("> div.toggle-content").stop().slideUp(350, function(){ $(this).attr('style', '').hide(); }); }); }} toggleContent.stop().slideDown(350, function(){ $(this).attr('style', '').show(); theme.refreshVCContent(toggleContent); }); parentSection.addClass("active"); }else{ if(!parentToggles.length||parentToggles.data('view')!='one-toggle'){ toggleContent.stop().slideUp(350, function(){ $(this).attr('style', '').hide(); }); parentSection.removeClass("active"); }} }); return this; }}; $.extend(theme, { Toggle: Toggle }); $.fn.themeToggle=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.Toggle($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__parallax'; var Parallax=function($el, opts){ return this.initialize($el, opts); }; Parallax.defaults={ speed: 1.5, horizontalPosition: '50%', offset: 0 }; Parallax.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, Parallax.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $window=$(window), offset, yPos, bgpos; self.options.wrapper.removeAttr('style'); if(typeof self.options.wrapper.data('image-src')!='undefined') self.options.wrapper.css('background-image', 'url(' + self.options.wrapper.data('image-src') + ')'); if(!$.browser.mobile){ $window.on('scroll resize', function(){ offset=self.options.wrapper.offset(); yPos=-($window.scrollTop() - offset.top) / self.options.speed + (self.options.offset); bgpos=self.options.horizontalPosition + ' ' + yPos + 'px'; self.options.wrapper.css('background-position', bgpos); }); $window.trigger('scroll'); }else{ self.options.wrapper.addClass('parallax-disabled'); } return this; }}; $.extend(theme, { Parallax: Parallax }); $.fn.themeParallax=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.Parallax($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__toggle'; var VcImageZoom=function($el, opts){ return this.initialize($el, opts); }; VcImageZoom.defaults={ }; VcImageZoom.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, VcImageZoom.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.container; $el.parent().magnificPopup($.extend(true, {}, theme.mfpConfig, { delegate: ".porto-vc-zoom", gallery: { enabled: true }, mainClass: 'mfp-with-zoom', zoom: { enabled: true, duration: 300 }, type: 'image' })); return this; }}; $.extend(theme, { VcImageZoom: VcImageZoom }); $.fn.themeVcImageZoom=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.VcImageZoom($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ $.fn.themePin=function (options){ var scrollY=0, lastScrollY=0, elements=[], disabled=false, $window=$(window), fixedSideTop=[], fixedSideBottom=[]; options=options||{}; var recalculateLimits=function (){ for (var i=0, len=elements.length; i"); } var pad=$.extend({ top: 0, bottom: 0 }, options.padding||{}); var pt=parseInt($this.parent().parent().css('padding-top')), pb=parseInt($this.parent().parent().css('padding-bottom')); if(options.autoInit){ if($('#header').hasClass('header-side')){ pad.top=theme.adminBarHeight(); if($('.page-top.fixed-pos').length){ pad.top +=$('.page-top.fixed-pos').height(); }}else{ pad.top=theme.adminBarHeight(); if($('#header > .main-menu-wrap').length||!$('#header').hasClass('sticky-menu-header')){ pad.top +=theme.StickyHeader.sticky_height; }} if(typeof options.paddingOffsetTop!='undefined'){ pad.top +=parseInt(options.paddingOffsetTop, 10); }else{ pad.top +=18; } if(typeof options.paddingOffsetBottom!='undefined'){ pad.bottom=parseInt(options.paddingOffsetBottom, 10); }else{ pad.bottom=0; }} var bb=$this.css('border-bottom'), h=$this.outerHeight(); $this.css('border-bottom', '1px solid transparent'); var o_h=$this.outerHeight() - h - 1; $this.css('border-bottom', bb); $this.css({width: $this.outerWidth() <=$this.parent().width() ? $this.outerWidth():$this.parent().width()}); $this.parent().css("height", $this.outerHeight() + o_h); if((!options.autoFit&&!options.fitToBottom)||$this.outerHeight() <=$window.height()){ $this.data("themePin", { pad: pad, from: (options.containerSelector ? containerOffset.top:offset.top) - pad.top + pt, pb: pb, parentTop: parentOffset.top - pt, offset: o_h }); }else{ $this.data("themePin", { pad: pad, fromFitTop: (options.containerSelector ? containerOffset.top:offset.top) - pad.top + pt, from: (options.containerSelector ? containerOffset.top:offset.top) + $this.outerHeight() - $(window).height() + pt, pb: pb, parentTop: parentOffset.top - pt, offset: o_h }); }} }; var onScroll=function (){ if(disabled){ return; } scrollY=$window.scrollTop(); var window_height=window.innerHeight||$window.height(); for (var i=0, len=elements.length; i data.end||from >=to){ $this.css({position: "", top: "", left: ""}); if(options.activeClass){ $this.removeClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); continue; } if(scrollY > from&&scrollY < to){ !($this.css("position")=="fixed")&&$this.css({ left: $this.offset().left, top: data.pad.top }).css("position", "fixed"); if(options.activeClass){ $this.addClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); }else if(scrollY >=to){ $this.css({ left: "", top: to - data.parentTop + data.pad.top }).css("position", "absolute"); if(options.activeClass){ $this.addClass(options.activeClass); } if($this.hasClass('sticky-absolute')) $this.addClass('sticky-transition'); $this.addClass('sticky-absolute'); }else{ $this.css({position: "", top: "", left: ""}); if(options.activeClass){ $this.removeClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); }}else if(options.fitToBottom){ var from=data.from, to=data.to; if(data.from + window_height > data.end||data.from >=to){ $this.css({position: "", top: "", bottom: "", left: ""}); if(options.activeClass){ $this.removeClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); continue; } if(scrollY > from&&scrollY < to){ !($this.css("position")=="fixed")&&$this.css({ left: $this.offset().left, bottom: data.pad.bottom, top: "" }).css("position", "fixed"); if(options.activeClass){ $this.addClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); }else if(scrollY >=to){ $this.css({ left: "", top: data.to2, bottom: "" }).css("position", "absolute"); if(options.activeClass){ $this.addClass(options.activeClass); } if($this.hasClass('sticky-absolute')) $this.addClass('sticky-transition'); $this.addClass('sticky-absolute'); }else{ $this.css({position: "", top: "", bottom: "", left: ""}); if(options.activeClass){ $this.removeClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); }}else{ if(prevDataTo!=data.to){ fixedSideTop[i]=fixedSideBottom[i]=false; } if(( $this.height() + data.pad.top + data.pad.bottom) > window_height||fixedSideTop[i]||fixedSideBottom[i]){ var padTop=parseInt($this.parent().parent().css('padding-top')); if(scrollY + data.pad.top - padTop <=data.parentTop){ $this.css({position: "", top: "", bottom: "", left: ""}); fixedSideTop[i]=fixedSideBottom[i]=false; }else if(scrollY >=data.to){ $this.css({ left: "", top: data.to2, bottom: "" }).css("position", "absolute"); if(options.activeClass){ $this.addClass(options.activeClass); } if($this.hasClass('sticky-absolute')) $this.addClass('sticky-transition'); $this.addClass('sticky-absolute'); }else{ if(scrollY >=lastScrollY){ if(fixedSideTop[i]){ fixedSideTop[i]=false; sidebarTop=$this.offset().top - data.parentTop; $this.css({ left: "", top: sidebarTop, bottom: "" }).css("position", "absolute"); if(options.activeClass){ $this.addClass(options.activeClass); } if($this.hasClass('sticky-absolute')) $this.addClass('sticky-transition'); $this.addClass('sticky-absolute'); }else if(! fixedSideBottom[i]&&$this.height() + $this.offset().top + data.pad.bottom < scrollY + window_height){ fixedSideBottom[i]=true; !($this.css("position")=="fixed")&&$this.css({ left: $this.offset().left, bottom: data.pad.bottom, top: "" }).css("position", "fixed"); if(options.activeClass){ $this.addClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); }}else if(scrollY < lastScrollY){ if(fixedSideBottom[i]){ fixedSideBottom[i]=false; sidebarTop=$this.offset().top - data.parentTop; $this.css({ left: "", top: sidebarTop, bottom: "" }).css("position", "absolute"); if(options.activeClass){ $this.addClass(options.activeClass); } if($this.hasClass('sticky-absolute')) $this.addClass('sticky-transition'); $this.addClass('sticky-absolute'); }else if(! fixedSideTop[i]&&$this.offset().top >=scrollY + data.pad.top){ fixedSideTop[i]=true; !($this.css("position")=="fixed")&&$this.css({ left: $this.offset().left, top: data.pad.top, bottom: '' }).css("position", "fixed"); if(options.activeClass){ $this.addClass(options.activeClass); } $this.removeClass('sticky-transition'); $this.removeClass('sticky-absolute'); }} }}else{ if(scrollY >=(data.parentTop - data.pad.top)){ $this.css({ position: 'fixed', top: data.pad.top }); }else{ $this.css({position: "", top: "", bottom: "", left: ""}); } fixedSideTop[i]=fixedSideBottom[i]=false; }} } lastScrollY=scrollY; }; var update=function (){ recalculateLimits(); onScroll(); }; this.each(function (){ var $this=$(this), data=$(this).data('themePin')||{}; if(data&&data.update){ return; } elements.push($this); $("img", this).one("load", recalculateLimits); data.update=update; $(this).data('themePin', data); fixedSideTop.push(false); fixedSideBottom.push(false); }); $(window).on('touchmove scroll', onScroll); recalculateLimits(); $window.on('load', update); $(this).bind('recalc.pin', function(){ recalculateLimits(); onScroll(); }); return this; }; theme=theme||{}; var instanceName='__sticky'; var Sticky=function($el, opts){ return this.initialize($el, opts); }; Sticky.defaults={ autoInit: false, minWidth: 767, activeClass: 'sticky-active', padding: { top: 0, bottom: 0 }, offsetTop: 0, offsetBottom: 0, autoFit: false, fitToBottom: false }; Sticky.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, Sticky.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ if(!($.isFunction($.fn.themePin))){ return this; } var self=this, $el=this.options.wrapper; this.options.minWidth -=theme.getScrollbarWidth(); if($el.hasClass('porto-sticky-nav')){ this.options.padding.top=theme.StickyHeader.sticky_height + theme.adminBarHeight(); this.options.activeClass='sticky-active'; this.options.containerSelector='.main-content-wrap'; theme.sticky_nav_height=$el.outerHeight(); if(this.options.minWidth > $(window).width()) theme.sticky_nav_height=0; } $el.themePin(this.options); $(window).smartresize(function(){ setTimeout(function(){ $el.trigger('recalc.pin'); }, 800); var $parent=$el.parent(); $el.outerWidth($parent.width()); if($el.css('position')=='fixed'){ $el.css('left', $parent.offset().left); } if($el.hasClass('porto-sticky-nav')){ theme.sticky_nav_height=$el.outerHeight(); if(self.options.minWidth > $(window).width()) theme.sticky_nav_height=0; }}); return this; }}; $.extend(theme, { Sticky: Sticky }); $.fn.themeSticky=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ $this.trigger('recalc.pin'); setTimeout(function(){ $this.trigger('recalc.pin'); }, 800); return $this.data(instanceName); }else{ return new theme.Sticky($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ $(function(){ $(document.body).on('click', '.mobile-toggle', function(e){ if($('#nav-panel').length > 0){ $('#nav-panel').stop().slideToggle(); }else if($('#side-nav-panel').length > 0){ if($('html').hasClass('panel-opened')){ $('html').removeClass('panel-opened'); $('.panel-overlay').removeClass('active'); }else{ $('html').addClass('panel-opened'); $('.panel-overlay').addClass('active'); }} }); $('.panel-overlay').click(function(){ $('html').removeClass('panel-opened'); $(this).removeClass('active'); }); $('#side-nav-panel .side-nav-panel-close').click(function(e){ e.preventDefault(); $('.panel-overlay').click(); }); $(window).on('resize', function(){ if($(window).width() > 991 - theme.getScrollbarWidth()){ $('#nav-panel').hide(); $('.panel-overlay').click(); }}); }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ $(function(){ $(document).on('click', '.portfolio-like', function(e){ e.preventDefault(); var $this=$(this), $parent=$this.parent(), portfolio_id=$this.attr('data-id'); $.post(theme.ajax_url, { portfolio_id: portfolio_id, action: 'porto_portfolio-like' }, function(data){ if(data){ $this.remove(); $parent.html(data); $parent.find("data-tooltip").tooltip(); }} ); return false; }); }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ $(function(){ $(document).on('click', '.blog-like', function(e){ e.preventDefault(); var $this=$(this), $parent=$this.parent(), blog_id=$this.attr('data-id'); if($this.hasClass('updating')){ return false; } $this.addClass('updating').text('...'); $.post(theme.ajax_url, { blog_id: blog_id, action: 'porto_blog-like' }, function(data){ if(data){ $this.remove(); $parent.html(data); $parent.find("data-tooltip").tooltip(); }} ); return false; }); }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { ScrollToTop: { defaults: { html: '', offsetx: 10, offsety: 0 }, initialize: function(html, offsetx, offsety){ this.html=(html||this.defaults.html); this.offsetx=(offsetx||this.defaults.offsetx); this.offsety=(offsety||this.defaults.offsety); this.build(); return this; }, build: function(){ var self=this; if(typeof scrolltotop!=='undefined'){ scrolltotop.controlHTML=self.html; scrolltotop.controlattrs={offsetx: self.offsetx, offsety: self.offsety}; scrolltotop.init(); } return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { MegaMenu: { defaults: { menu: $('.mega-menu') }, initialize: function($menu){ this.$menu=($menu||this.defaults.menu); this.build() .events(); return this; }, popupWidth: function(){ var winWidth=$(window).width() + theme.getScrollbarWidth(); var popupWidth=$(window).width() - theme.grid_gutter_width * 2; if(!$('body').hasClass('wide')){ if(winWidth >=theme.container_width + theme.grid_gutter_width - 1) popupWidth=theme.container_width - theme.grid_gutter_width; else if(winWidth >=992) popupWidth=960 - theme.grid_gutter_width; else if(winWidth >=768) popupWidth=720 - theme.grid_gutter_width; } return popupWidth; }, calcMenuPosition: function(menu_obj){ var menu=menu_obj, menuContainerWidth=$("#header .header-main .container").outerWidth() - parseInt($("#header .header-main .container").css('padding-left')) - parseInt($("#header .header-main .container").css('padding-right')); if(menuContainerWidth < 900) return; var browserWidth=Math.max(document.documentElement.clientWidth, window.innerWidth||0), menuLeftPos=menu.offset().left - (browserWidth - menuContainerWidth) / 2; if(window.theme.rtl){ menuLeftPos=$(window).width() -(menu.offset().left + menu.outerWidth()) - (browserWidth - menuContainerWidth) / 2; } var menuWidth=menu.width(), remainWidth=menuContainerWidth - (menuLeftPos+menuWidth), l=false; if(menuLeftPos > remainWidth&&menuLeftPos < menuWidth){ l=(menuLeftPos + remainWidth) / 3; } if(remainWidth < 0){ l=-remainWidth; } return l; }, build: function(){ var self=this; self.$menu.each(function(){ var $menu=$(this); var $menu_container=$menu.closest('.container'); var container_width=self.popupWidth(); var offset=0; if($menu_container.length){ if(theme.rtl){ offset=($menu_container.offset().left + $menu_container.width()) - ($menu.offset().left + $menu.width()) + parseInt($menu_container.css('padding-right')); }else{ offset=$menu.offset().left - $menu_container.offset().left - parseInt($menu_container.css('padding-left')); } offset=(offset==1) ? 0:offset; } var $menu_items=$menu.find('> li'); $menu_items.each(function(){ var $menu_item=$(this); var $popup=$menu_item.find('> .popup'); if($popup.length > 0){ $popup.css('display', 'block'); if($menu_item.hasClass('wide')){ $popup.css('left', 0); var padding=parseInt($popup.css('padding-left')) + parseInt($popup.css('padding-right')) + parseInt($popup.find('> .inner').css('padding-left')) + parseInt($popup.find('> .inner').css('padding-right')); var row_number=4; if($menu_item.hasClass('col-2')) row_number=2; if($menu_item.hasClass('col-3')) row_number=3; if($menu_item.hasClass('col-4')) row_number=4; if($menu_item.hasClass('col-5')) row_number=5; if($menu_item.hasClass('col-6')) row_number=6; if($(window).width() < 992 - theme.scrollbarWidth) row_number=1; var col_length=0; $popup.find('> .inner > ul > li').each(function(){ var cols=parseFloat($(this).attr('data-cols')); if(cols <=0) cols=1; if(cols > row_number) cols=row_number; col_length +=cols; }); if(col_length > row_number) col_length=row_number; var popup_max_width=$popup.find('.inner').css('max-width'); var col_width=container_width / row_number; if('none'!==popup_max_width&&popup_max_width < container_width){ col_width=parseInt(popup_max_width) / row_number; } $popup.find('> .inner > ul > li').each(function(){ var cols=parseFloat($(this).attr('data-cols')); if(cols <=0) cols=1; if(cols > row_number) cols=row_number; if($menu_item.hasClass('pos-center')||$menu_item.hasClass('pos-left')||$menu_item.hasClass('pos-right')) $(this).css('width', (100 / col_length * cols) + '%'); else $(this).css('width', (100 / row_number * cols) + '%'); }); if($menu_item.hasClass('pos-center')){ $popup.find('> .inner > ul').width(col_width * col_length - padding); var left_position=$popup.offset().left - ($(window).width() - col_width * col_length) / 2; $popup.css({ 'left': -left_position }); }else if($menu_item.hasClass('pos-left')){ $popup.find('> .inner > ul').width(col_width * col_length - padding); $popup.css({ 'left': -15 }); }else if($menu_item.hasClass('pos-right')){ $popup.find('> .inner > ul').width(col_width * col_length - padding); $popup.css({ 'left': 'auto', 'right': -15 }); }else{ $popup.find('> .inner > ul').width(container_width - padding); var left_position=self.calcMenuPosition($popup); if(theme.rtl){ $popup.css({ 'right': -15, 'left': 'auto' }); if(left_position){ $popup.css({ 'right': -left_position, 'left': 'auto' }); }}else{ $popup.css({ 'left': -15, 'right': 'auto' }); if(left_position){ $popup.css({ 'left': -left_position, 'right': 'auto' }); }} }} /*if(!($menu.hasClass('effect-down'))) $popup.css('display', 'none'); $menu_item.hoverIntent($.extend({}, theme.hoverIntentConfig, { over: function(){ if(!($menu.hasClass('effect-down'))) $menu_items.find('.popup').hide(); $popup.show(); }, out: function(){ if(!($menu.hasClass('effect-down'))) $popup.hide(); }}) );*/ }}); }); return self; }, events: function(){ var self=this; $(window).on('resize', function(){ self.build(); }); setTimeout(function(){ self.build(); }, 400); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { SidebarMenu: { defaults: { menu: $('.sidebar-menu:not(.side-menu-accordion)'), toggle: $('.widget_sidebar_menu .widget-title .toggle'), menu_toggle: $('#main-toggle-menu .menu-title') }, rtl: theme.rtl, initialize: function($menu, $toggle, $menu_toggle){ this.$menu=($menu||this.defaults.menu); this.$toggle=($toggle||this.defaults.toggle); this.$menu_toggle=($menu_toggle||this.defaults.menu_toggle); this.build() .events(); return this; }, isRightSidebar: function($menu){ var flag=false; if(this.rtl){ flag = !($('#main').hasClass('column2-right-sidebar')||$('#main').hasClass('column2-wide-right-sidebar')); }else{ flag=$('#main').hasClass('column2-right-sidebar')||$('#main').hasClass('column2-wide-right-sidebar'); } if($menu.closest('#main-toggle-menu').length){ if(this.rtl){ flag=true; }else{ flag=false; }} if($header_wrapper=$menu.closest('.header-wrapper')){ if($header_wrapper.length&&$header_wrapper.hasClass('header-side-nav')){ if(this.rtl){ flag=true; }else{ flag=false; } if($('.page-wrapper').hasClass('side-nav-right')){ if(this.rtl){ flag=false; }else{ flag=true; }} }} return flag; }, popupWidth: function(){ var winWidth=$(window).width() + theme.getScrollbarWidth(); var popupWidth=$(window).width() - theme.grid_gutter_width * 2; if(!$('body').hasClass('wide')){ if(winWidth >=theme.container_width + theme.grid_gutter_width - 1) popupWidth=theme.container_width - theme.grid_gutter_width; else if(winWidth >=992) popupWidth=960 - theme.grid_gutter_width; else if(winWidth >=768) popupWidth=720 - theme.grid_gutter_width; } return popupWidth; }, build: function(){ var self=this; if(!self.$menu.hasClass('side-menu-slide')){ self.$menu.each(function(){ var $menu=$(this); var $menu_container=$menu.closest('.container'); var container_width; if($(window).width() < 992 - theme.getScrollbarWidth()) container_width=self.popupWidth(); else container_width=self.popupWidth() - $menu.width() - 45; var is_right_sidebar=self.isRightSidebar($menu); var $menu_items=$menu.find('> li'); $menu_items.each(function(){ var $menu_item=$(this); var $popup=$menu_item.find('> .popup'); if($popup.length > 0){ $popup.css('display', 'block'); if($menu_item.hasClass('wide')){ $popup.css('left', 0); var padding=parseInt($popup.css('padding-left')) + parseInt($popup.css('padding-right')) + parseInt($popup.find('> .inner').css('padding-left')) + parseInt($popup.find('> .inner').css('padding-right')); var row_number=4; if($menu_item.hasClass('col-2')) row_number=2; if($menu_item.hasClass('col-3')) row_number=3; if($menu_item.hasClass('col-4')) row_number=4; if($menu_item.hasClass('col-5')) row_number=5; if($menu_item.hasClass('col-6')) row_number=6; if($(window).width() < 992 - theme.getScrollbarWidth()) row_number=1; var col_length=0; $popup.find('> .inner > ul > li').each(function(){ var cols=parseFloat($(this).attr('data-cols')); if(cols <=0) cols=1; if(cols > row_number) cols=row_number; col_length +=cols; }); if(col_length > row_number) col_length=row_number; var popup_max_width=$popup.find('.inner').css('max-width'); var col_width=container_width / row_number; if('none'!==popup_max_width&&popup_max_width < container_width){ col_width=parseInt(popup_max_width) / row_number; } $popup.find('> .inner > ul > li').each(function(){ var cols=parseFloat($(this).attr('data-cols')); if(cols <=0) cols=1; if(cols > row_number) cols=row_number; if($menu_item.hasClass('pos-center')||$menu_item.hasClass('pos-left')||$menu_item.hasClass('pos-right')) $(this).css('width', (100 / col_length * cols) + '%'); else $(this).css('width', (100 / row_number * cols) + '%'); }); $popup.find('> .inner > ul').width(col_width * col_length + 1); if(is_right_sidebar){ $popup.css({ 'left': 'auto', 'right': $(this).width() }); }else{ $popup.css({ 'left': $(this).width(), 'right': 'auto' }); }} $popup.css('display', 'none'); if($menu.hasClass('side-menu-accordion')){ }else if($menu.hasClass('side-menu-slide')){ }else{ $menu_item.hoverIntent($.extend({}, theme.hoverIntentConfig, { over: function(){ $menu_items.find('.popup').hide(); $popup.show(); $popup.parent().addClass('open'); }, out: function(){ $popup.hide(); $popup.parent().removeClass('open'); }}) ); }} }); }); } return self; }, events: function(){ var self=this; self.$toggle.click(function(){ var $widget=$(this).parent().parent(); var $this=$(this); if($this.hasClass('closed')){ $this.removeClass('closed'); $widget.removeClass('closed'); $widget.find('.sidebar-menu-wrap').stop().slideDown(400, function(){ $(this).attr('style', '').show(); self.build(); }); }else{ $this.addClass('closed'); $widget.addClass('closed'); $widget.find('.sidebar-menu-wrap').stop().slideUp(400, function(){ $(this).attr('style', '').hide(); }); }}); this.$menu_toggle.click(function(){ var $toggle_menu=$(this).parent(); var $this=$(this); if($this.hasClass('closed')){ $this.removeClass('closed'); $toggle_menu.removeClass('closed'); $toggle_menu.find('.toggle-menu-wrap').stop().slideDown(400, function(){ $(this).attr('style', '').show(); }); self.build(); }else{ $this.addClass('closed'); $toggle_menu.addClass('closed'); $toggle_menu.find('.toggle-menu-wrap').stop().slideUp(400, function(){ $(this).attr('style', '').hide(); }); }}); if(self.$menu.hasClass('side-menu-slide')){ var slideNavigation={ $mainNav: self.$menu, $mainNavItem: self.$menu.find('li'), build: function(){ var self=this; self.menuNav(); }, menuNav: function(){ var self=this; self.$mainNav.find('.menu-item-has-children > a.nolink').removeClass('nolink').attr('href', ''); self.$mainNav.find('.menu-item-has-children > a:not(.go-back)').on('click', function(e){ e.preventDefault(); var currentMenu=$(this).closest('ul'); nextMenu=$(this).parent().find('ul').first(), prevMenu=$(this).closest('.next-menu'); if(nextMenu.children('.menu-item').children('.go-back').length < 1){ nextMenu.prepend(''); } var nextMenuHeightDiff=nextMenu.find('> li').length * nextMenu.find('> li').outerHeight() - nextMenu.outerHeight(), prevMenuHeightDiff=prevMenu.find('> li').length * prevMenu.find('> li').outerHeight() - prevMenu.outerHeight(); currentMenu.addClass('next-menu'); nextMenu.addClass('visible'); currentMenu.css({ overflow: 'visible', 'overflow-y': 'visible' }); if(nextMenuHeightDiff > 0){ nextMenu.css({ overflow: 'hidden', 'overflow-y': 'scroll' }); } if(nextMenu.outerHeight() < (nextMenu.closest('.header-main').outerHeight() - 100)){ nextMenu.css({ height: nextMenu.outerHeight() + nextMenu.find('> li').outerHeight() }); } nextMenu.css({ 'padding-top': nextMenuHeightDiff + 'px' }); e.stopPropagation(); return false; }); self.$mainNav.on('click', '.go-back', function(e){ e.preventDefault(); var prevMenu=$(this).closest('.next-menu'), prevMenuHeightDiff=prevMenu.find('> li').length * prevMenu.find('> li').outerHeight() - prevMenu.outerHeight(); prevMenu.removeClass('next-menu'); $(this).closest('ul').removeClass('visible'); if(prevMenuHeightDiff > 0){ prevMenu.css({ overflow: 'hidden', 'overflow-y': 'scroll' }); }}) }} slideNavigation.build(); } $(window).on('resize', function(){ self.build(); }); setTimeout(function(){ self.build(); }, 400); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { StickyHeader: { defaults: { header: $('#header') }, initialize: function($header){ this.$header=($header||this.defaults.header); this.sticky_height=0; this.sticky_offset=0; this.sticky_pos=0; this.change_logo=theme.change_logo; if(!theme.show_sticky_header||!this.$header.length||$('.side-header-narrow-bar').length) return this; var self=this; var $header_top=self.$header.find('> .header-top'); if($header_top.length){ self.$header_top=$header_top; self.top_height=$header_top.height(); }else{ self.$header_top=false; } var $menu_wrap=self.$header.find('> .main-menu-wrap'); if($menu_wrap.length){ self.$menu_wrap=$menu_wrap; self.menu_height=$menu_wrap.height(); }else{ self.$menu_wrap=false; } self.$header_main=self.$header.find('.header-main'); self.reveal=self.$header.parents('.header-wrapper').hasClass('header-reveal'); self.is_sticky=false; self.reset() .build() .events(); return self; }, build: function(){ var self=this; if(!self.is_sticky&&($(window).height() + self.header_height + theme.adminBarHeight() + parseInt(self.$header.css('border-top-width')) >=$(document).height())){ return self; } if($(window).height() > $('body').height()) window.scrollTo(0, 0); var scroll_top=$(window).scrollTop(); if(self.$menu_wrap&&!theme.isTablet()){ self.$header_main.stop().css('top', 0); if(self.$header.parent().hasClass('fixed-header')) self.$header.parent().attr('style', ''); if(scroll_top > self.sticky_pos){ if(!self.$header.hasClass('sticky-header')){ var header_height=self.$header.outerHeight(); self.$header.addClass('sticky-header').css('height', header_height); self.$menu_wrap.stop().css('top', theme.adminBarHeight()); var selectric=self.$header.find('.header-main .searchform select').data('selectric'); if(selectric&&typeof selectric.close!='undefined') selectric.close(); if(self.$header.parent().hasClass('fixed-header')){ self.$header_main.hide(); self.$header.css('height', ''); } if(!self.init_toggle_menu){ self.init_toggle_menu=true; theme.MegaMenu.build(); if($('#main-toggle-menu').length){ if($('#main-toggle-menu').hasClass('show-always')){ $('#main-toggle-menu').data('show-always', true); $('#main-toggle-menu').removeClass('show-always'); } $('#main-toggle-menu').addClass('closed'); $('#main-toggle-menu .menu-title').addClass('closed'); $('#main-toggle-menu .toggle-menu-wrap').attr('style', ''); }} self.is_sticky=true; }}else{ if(self.$header.hasClass('sticky-header')){ self.$header.removeClass('sticky-header'); self.$header.css('height', ''); self.$menu_wrap.stop().css('top', 0); self.$header_main.show(); var selectric=self.$header.find('.main-menu-wrap .searchform select').data('selectric'); if(selectric&&typeof selectric.close!='undefined') selectric.close(); if(self.init_toggle_menu){ self.init_toggle_menu=false; theme.MegaMenu.build(); if($('#main-toggle-menu').length){ if($('#main-toggle-menu').data('show-always')){ $('#main-toggle-menu').addClass('show-always'); $('#main-toggle-menu').removeClass('closed'); $('#main-toggle-menu .menu-title').removeClass('closed'); $('#main-toggle-menu .toggle-menu-wrap').attr('style', ''); }} } self.is_sticky=false; }} }else{ self.$header_main.show(); if(self.$header.parent().hasClass('fixed-header')&&$('#wpadminbar').length&&$('#wpadminbar').css('position')=='absolute'){ self.$header.parent().css('top', ($('#wpadminbar').height() - scroll_top) < 0 ? -$('#wpadminbar').height():-scroll_top); }else if(self.$header.parent().hasClass('fixed-header')){ self.$header.parent().attr('style', ''); }else{ if(self.$header.parent().hasClass('fixed-header')) self.$header.parent().attr('style', ''); } if(self.$header.hasClass('sticky-menu-header')&&!theme.isTablet()){ self.$header_main.stop().css('top', 0); if(self.change_logo) self.$header_main.removeClass('change-logo'); self.$header_main.removeClass('sticky'); self.$header.removeClass('sticky-header'); self.is_sticky=false; self.sticky_height=0; self.sticky_offset=0; }else{ if(self.$menu_wrap) self.$menu_wrap.stop().css('top', 0); if(scroll_top > self.sticky_pos&&(!theme.isTablet()||(theme.isTablet()&&(!theme.isMobile()&&theme.show_sticky_header_tablet)||(theme.isMobile()&&theme.show_sticky_header_tablet&&theme.show_sticky_header_mobile)))){ if(!self.$header.hasClass('sticky-header')){ var header_height=self.$header.outerHeight(); self.$header.addClass('sticky-header').css('height', header_height); self.$header_main.addClass('sticky'); if(self.change_logo) self.$header_main.addClass('change-logo'); self.$header_main.stop().css('top', theme.adminBarHeight()); if(!self.init_toggle_menu){ self.init_toggle_menu=true; theme.MegaMenu.build(); if($('#main-toggle-menu').length){ if($('#main-toggle-menu').hasClass('show-always')){ $('#main-toggle-menu').data('show-always', true); $('#main-toggle-menu').removeClass('show-always'); } $('#main-toggle-menu').addClass('closed'); $('#main-toggle-menu .menu-title').addClass('closed'); $('#main-toggle-menu .toggle-menu-wrap').attr('style', ''); }} self.is_sticky=true; }}else{ if(self.$header.hasClass('sticky-header')){ if(self.change_logo) self.$header_main.removeClass('change-logo'); self.$header_main.removeClass('sticky'); self.$header.removeClass('sticky-header'); self.$header.css('height', ''); self.$header_main.stop().css('top', 0); if(self.init_toggle_menu){ self.init_toggle_menu=false; theme.MegaMenu.build(); if($('#main-toggle-menu').length){ if($('#main-toggle-menu').data('show-always')){ $('#main-toggle-menu').addClass('show-always'); $('#main-toggle-menu').removeClass('closed'); $('#main-toggle-menu .menu-title').removeClass('closed'); $('#main-toggle-menu .toggle-menu-wrap').attr('style', ''); }} } self.is_sticky=false; }} }} if(!self.$header.hasClass('header-loaded')) self.$header.addClass('header-loaded'); if(!self.$header.find('.logo').hasClass('logo-transition')) self.$header.find('.logo').addClass('logo-transition'); if(self.$header.find('.overlay-logo').get(0)&&!self.$header.find('.overlay-logo').hasClass('overlay-logo-transition')) self.$header.find('.overlay-logo').addClass('overlay-logo-transition'); return self; }, reset: function(){ var self=this; if(self.$header.find('.logo').hasClass('logo-transition')) self.$header.find('.logo').removeClass('logo-transition'); if(self.$header.find('.overlay-logo').get(0)&&self.$header.find('.overlay-logo').hasClass('overlay-logo-transition')) self.$header.find('.overlay-logo').removeClass('overlay-logo-transition'); if(self.$menu_wrap&&!theme.isTablet()){ self.$header.addClass('sticky-header sticky-header-calc'); self.$header_main.addClass('sticky'); if(self.change_logo) self.$header_main.addClass('change-logo'); self.sticky_height=self.$menu_wrap.height() + parseInt(self.$menu_wrap.css('padding-top')) + parseInt(self.$menu_wrap.css('padding-bottom')); self.sticky_offset=parseInt(self.$menu_wrap.css('padding-top')) + parseInt(self.$menu_wrap.css('padding-bottom')); if(self.change_logo) self.$header_main.removeClass('change-logo'); self.$header_main.removeClass('sticky'); self.$header.removeClass('sticky-header sticky-header-calc'); self.header_height=self.$header.height() + parseInt(self.$header.css('margin-top')); self.menu_height=self.$menu_wrap.height() + parseInt(self.$menu_wrap.css('padding-top')) + parseInt(self.$menu_wrap.css('padding-bottom')); self.sticky_pos=(self.header_height - self.sticky_height) + $('.banner-before-header').height() + parseInt($('body').css('padding-top')) + parseInt(self.$header.css('border-top-width')); if(self.reveal){ self.sticky_pos +=self.menu_height + 30; }}else{ self.$header.addClass('sticky-header sticky-header-calc'); self.$header_main.addClass('sticky'); if(self.change_logo) self.$header_main.addClass('change-logo'); self.sticky_main_height=self.$header_main.height(); if(self.change_logo) self.$header_main.removeClass('change-logo'); self.$header_main.removeClass('sticky'); self.$header.removeClass('sticky-header sticky-header-calc'); self.header_height=self.$header.height() + parseInt(self.$header.css('margin-top')); self.main_height=self.$header_main.height(); self.sticky_height=self.sticky_main_height; self.sticky_offset=self.main_height - self.sticky_main_height; if(!(!theme.isTablet()||(theme.isTablet()&&(!theme.isMobile()&&theme.show_sticky_header_tablet)||(theme.isMobile()&&theme.show_sticky_header_tablet&&theme.show_sticky_header_mobile)))){ self.sticky_height=0; self.sticky_offset=0; } self.sticky_pos=(self.header_height - self.sticky_main_height) + $('.banner-before-header').height() + parseInt($('body').css('padding-top')) + parseInt(self.$header.css('border-top-width')); if(self.reveal){ self.sticky_pos +=self.main_height + 30; }} if(self.sticky_pos < 0){ self.sticky_pos=0; } self.init_toggle_menu=false; self.$header_main.removeAttr('style'); self.$header.removeAttr('style'); return self; }, events: function(){ var self=this, win_width=0; /*$(window).on('resize', function(){ if(win_width!=$(window).width()){ self.reset() .build(); win_width=$(window).width(); }});*/ $(window).on('scroll', function(){ self.build(); }); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { SideNav: { defaults: { side_nav: $('.header-side-nav #header') }, bc_pos_top: 0, initialize: function($side_nav){ this.$side_nav=($side_nav||this.defaults.side_nav); if(!this.$side_nav.length) return this; var self=this; self.$side_nav.addClass('initialize'); self.reset() .build() .events(); return self; }, build: function(){ var self=this; $page_top=$('.page-top'); $main=$('#main'); if(theme.isTablet()){ self.$side_nav.removeClass("fixed-bottom"); $page_top.removeClass("fixed-pos"); $page_top.attr('style', ''); $main.attr('style', ''); }else{ var side_height=self.$side_nav.innerHeight(); var window_height=$(window).height(); var scroll_top=$(window).scrollTop(); if(side_height - window_height + theme.adminBarHeight() < scroll_top){ if(!self.$side_nav.hasClass("fixed-bottom")) self.$side_nav.addClass("fixed-bottom"); }else{ if(self.$side_nav.hasClass("fixed-bottom")) self.$side_nav.removeClass("fixed-bottom"); } if($page_top.length&&$page_top.outerHeight() < 100&&!$('.side-header-narrow-bar-top').length){ if(self.page_top_offset==theme.adminBarHeight()||self.page_top_offset <=scroll_top){ if(!$page_top.hasClass("fixed-pos")){ $page_top.addClass("fixed-pos"); $page_top.css('top', theme.adminBarHeight()); $main.css('padding-top', $page_top.outerHeight()); }}else{ if($page_top.hasClass("fixed-pos")){ $page_top.removeClass("fixed-pos"); $page_top.attr('style', ''); $main.attr('style', ''); }} } $main.css('min-height', $(window).height() - theme.adminBarHeight() - $('.page-top:not(.fixed-pos)').height() - $('.footer-wrapper').height()); } return self; }, reset: function(){ var self=this; if(theme.isTablet()){ self.$side_nav.attr('style', ''); }else{ var w_h=$(window).height(); $side_bottom=self.$side_nav.find('.side-bottom'); self.$side_nav.css({ 'min-height': w_h - theme.adminBarHeight(), 'padding-bottom': $side_bottom.height() + parseInt($side_bottom.css('margin-top')) + parseInt($side_bottom.css('margin-bottom')) }); var appVersion=navigator.appVersion; var webkitVersion_positionStart=appVersion.indexOf("AppleWebKit/") + 12; var webkitVersion_positionEnd=webkitVersion_positionStart + 3; var webkitVersion=appVersion.slice(webkitVersion_positionStart,webkitVersion_positionEnd); if(webkitVersion < 537){ self.$side_nav.css('-webkit-backface-visibility', 'hidden'); self.$side_nav.css('-webkit-perspective', '1000'); }} $page_top=$('.page-top'); $main=$('#main'); if($page_top.length){ $page_top.removeClass("fixed-pos"); $page_top.attr('style', ''); $main.attr('style', ''); self.page_top_offset=$page_top.offset().top; } return self; }, events: function(){ var self=this; $(window).on('resize', function(){ self.reset() .build(); }); $(window).on('scroll', function(){ self.build(); }); if($('.side-header-narrow-bar-top').length){ if($(window).scrollTop() > theme.adminBarHeight() + $('.side-header-narrow-bar-top').height()){ $('.side-header-narrow-bar-top').addClass('side-header-narrow-bar-sticky'); } $(window).on('scroll', function(){ var scroll_top=$(this).scrollTop(); if(scroll_top > theme.adminBarHeight() + $('.side-header-narrow-bar-top').height()){ $('.side-header-narrow-bar-top').addClass('side-header-narrow-bar-sticky'); }else{ $('.side-header-narrow-bar-top').removeClass('side-header-narrow-bar-sticky'); }}); } $('.side-header-narrow-bar .hamburguer-btn').on('click', function(){ $(this).toggleClass('active'); $('#header').toggleClass('side-header-visible'); if($(this).closest('.side-header-narrow-bar-top').length){ $(this).closest('.side-header-narrow-bar-top').toggle(); }}); $('.hamburguer-close').on('click', function(){ $('.side-header-narrow-bar .hamburguer-btn').trigger('click'); }); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { Search: { defaults: { popup: $('.searchform-popup'), form: $('.searchform') }, initialize: function($popup, $form){ this.$popup=($popup||this.defaults.popup); this.$form=($form||this.defaults.form); this.build() .events(); return this; }, build: function(){ var self=this; var $search_form_texts=self.$form.find('.text input'), $search_form_cats=self.$form.find('.cat'); if($('.header-wrapper .searchform .cat').get(0)&&$.fn.selectric){ $('.header-wrapper .searchform .cat').selectric({ arrowButtonMarkup: '', expandToItemText: true, maxHeight: 240 }); } $search_form_texts.on('change', function(){ var $this=$(this), val=$this.val(); $search_form_texts.each(function(){ if($this!=$(this)) $(this).val(val); }); }); $search_form_cats.on('change', function(){ var $this=$(this), val=$this.val(); $search_form_cats.each(function(){ if($this!=$(this)) $(this).val(val); }); }); return this; }, events: function(){ var self=this; self.$popup.click(function(e){ e.stopPropagation(); }); self.$popup.find('.search-toggle').click(function(e){ $(this).toggleClass('opened'); $(this).next().toggle(); e.stopPropagation(); }); if(!('ontouchstart' in document)){ $('html,body').click(function(){ self.removeFormStyle(); }); $(window).on('resize', function(){ self.removeFormStyle(); }); } return self; }, removeFormStyle: function(){ this.$form.removeAttr('style'); this.$popup.find('.search-toggle').removeClass('opened'); }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { HashScroll: { initialize: function(){ this.build() .events(); return this; }, build: function(){ var self=this; try { var hash=window.location.hash; var target=$(hash); if(target.length&&!(hash=='#review_form'||hash=='#reviews'||hash.indexOf('#comment-')!=-1)){ setTimeout(function(){ $('html, body').stop().animate({ scrollTop: target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1 }, 600, 'easeOutQuad', function(){ self.activeMenuItem(); }); }, 600); } return self; } catch (err){ return self; }}, getTarget: function(href){ var target; if(href.indexOf('#')==0){ target=$(href); }else{ var url=window.location.href; url=url.substring(url.indexOf('://') + 3); if(url.indexOf('#')!=-1) url=url.substring(0, url.indexOf('#')); href=href.substring(href.indexOf('://') + 3); href=href.substring(href.indexOf(url) + url.length); if(href.indexOf('#')==0){ target=$(href); }} return target; }, activeMenuItem: function(){ var self=this; var scroll_pos=$(window).scrollTop(); var $menu_items=$('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"]'); if($menu_items.length){ $menu_items.each(function(){ var $this=$(this); var href=$this.attr('href'); var target=self.getTarget(href); if(target&&target.get(0)){ if($this.is(':last-child')&&scroll_pos + $(window).height() >=target.offset().top + target.outerHeight()){ $this.parent().siblings().removeClass('active'); $this.parent().addClass('active'); }else{ var scroll_to=target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1, $parent=$this.parent(); if(scroll_to <=scroll_pos + 5){ $parent.siblings().removeClass('active'); $parent.addClass('active'); }else{ $parent.removeClass('active'); }} }}); } return self; }, events: function(){ var self=this; $('.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"], a[href*="#"].hash-scroll, .hash-scroll-wrap a[href*="#"]').on('click', function(e){ e.preventDefault(); var $this=$(this); var href=$this.attr('href'); var target=self.getTarget(href); if(target&&target.get(0)){ var $parent=$this.parent(); var scroll_to=target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1; $('html, body').stop().animate({ scrollTop: scroll_to }, 600, 'easeOutQuad', function(){ self.activeMenuItem(); $parent.siblings().removeClass('active'); $parent.addClass('active'); }); }else{ window.location.href=$this.attr('href'); }}); $(window).on('scroll', function(){ self.activeMenuItem(); }); self.activeMenuItem(); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { FaqFilter: { defaults: { elements: '.faq-filter' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); $this.find('li').on('click', function(e){ e.preventDefault(); var selector=$(this).attr('data-filter'), position=$this.data('position'), $parent; $this.find('.active').removeClass('active'); if(position=='sidebar'){ $parent=$('.main-content .page-faqs'); theme.scrolltoContainer($parent); $('.sidebar-overlay').click(); }else if(position=='global'){ $parent=$('.main-content .page-faqs'); }else{ $parent=$(this).closest('.page-faqs'); } var selected=0; $parent.find('.faq').each(function(){ var $that=$(this), easing="easeInOutQuart", timeout=300; if(selector=='*'){ if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){ $(this).attr('style', '').show(); }); selected++; }else{ if($that.hasClass(selector)){ if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){ $(this).attr('style', '').show(); }); selected++; }else{ if($that.css('display')!='none') $that.stop(true).slideUp(timeout, easing, function(){ $(this).attr('style', '').hide(); }); }} }); if(!selected&&$parent.find('.faqs-infinite').length&&typeof ($.fn.infinitescroll)!='undefined'){ $parent.find('.faqs-infinite').infinitescroll('retrieve'); } $(this).addClass('active'); if(position=='sidebar'){ self.$elements.each(function(){ var $that=$(this); if($that==$this&&$that.data('position')!='sidebar') return; $that.find('li').removeClass('active'); $that.find('li[data-filter="' + selector + '"]').addClass('active'); }); } window.location.hash='#' + selector; theme.refreshVCContent(); }); }); function hashchange(){ var $filter=$(self.$elements.get(0)), hash=window.location.hash; if(hash){ $filter.find('li[data-filter="' + hash.replace('#', '') + '"]').click(); }} $(window).on('hashchange', hashchange); hashchange(); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { FilterZoom: { defaults: { elements: null }, initialize: function($elements){ this.$elements=($elements||this.defaults.elements); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this), zoom=$this.find('.zoom, .thumb-info-zoom').get(0); if(!zoom) return; $this.find('.zoom, .thumb-info-zoom').unbind('click'); var links=[]; var i=0; $this.find('article').each(function(){ var $that=$(this); if($that.css('display')!='none'){ var $zoom=$that.find('.zoom, .thumb-info-zoom'), slide, src=$zoom.data('src'), title=$zoom.data('title'); $zoom.data('index', i); if($.isArray(src)){ $.each(src, function(index, value){ slide={}; slide.src=value; slide.title=title[index]; links[i]=slide; i++; }); }else{ slide={}; slide.src=src; slide.title=title; links[i]=slide; i++; }} }); $this.find('article').each(function(){ var $that=$(this); if($that.css('display')!='none'){ $that.off('click', '.zoom, .thumb-info-zoom').on('click', '.zoom, .thumb-info-zoom', function(e){ var $zoom=$(this), $parent=$zoom.parents('.thumb-info'), offset=0; if($parent.get(0)){ var $slider=$parent.find('.porto-carousel'); if($slider.get(0)){ offset=$slider.data('owl.carousel').current() - $slider.find('.cloned').length / 2; }} e.preventDefault(); $.magnificPopup.close(); $.magnificPopup.open($.extend(true, {}, theme.mfpConfig, { items: links, gallery: { enabled: true }, type: 'image' }), $zoom.data('index') + offset); return false; }); }}); }); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var activePortfolioAjaxOnPage; $.extend(theme, { PortfolioAjaxPage: { defaults: { elements: '.page-portfolios' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); if(!$this.find('#portfolioAjaxBox').get(0)) return; var $container=$(this), portfolioAjaxOnPage={ $wrapper: $container, pages: [], currentPage: 0, total: 0, $ajaxBox: $this.find('#portfolioAjaxBox'), $ajaxBoxContent: $this.find('#portfolioAjaxBoxContent'), build: function(){ var self=this; self.pages=[]; self.total=0; $this.find('a[data-ajax-on-page]').each(function(){ self.add($(this)); }); $this.off('mousedown', 'a[data-ajax-on-page]').on('mousedown', 'a[data-ajax-on-page]', function (ev){ if(ev.which==2){ ev.preventDefault(); return false; }}); }, add: function($el){ var self=this, href=$el.attr('href'); self.pages.push(href); self.total++; $el.off('click').on('click', function(e){ e.preventDefault(); var _class=e.target.className if(_class=='owl-next'){ return false; }else if(_class=='owl-prev'){ return false; }else{ self.show(self.pages.indexOf(href)); } return false; }); }, events: function(){ var self=this; $this.off('click', 'a[data-ajax-portfolio-close]').on('click', 'a[data-ajax-portfolio-close]', function(e){ e.preventDefault(); self.close(); return false; }); if(self.total <=1){ $('a[data-ajax-portfolio-prev], a[data-ajax-portfolio-next]').remove(); }else{ $this.off('click', 'a[data-ajax-portfolio-prev]').on('click', 'a[data-ajax-portfolio-prev]', function(e){ e.preventDefault(); self.prev(); return false; }); $this.off('click', 'a[data-ajax-portfolio-next]').on('click', 'a[data-ajax-portfolio-next]', function(e){ e.preventDefault(); self.next(); return false; }); }}, close: function(){ var self=this; if(self.$ajaxBoxContent.find('.rev_slider').get(0)){ try {self.$ajaxBoxContent.find('.rev_slider').revkill();} catch(err){}} self.$ajaxBoxContent.empty(); self.$ajaxBox.removeClass('ajax-box-init').removeClass('ajax-box-loading'); }, next: function(){ var self=this; if(self.currentPage + 1 < self.total){ self.show(self.currentPage + 1); }else{ self.show(0); }}, prev: function(){ var self=this; if((self.currentPage - 1) >=0){ self.show(self.currentPage - 1); }else{ self.show(self.total - 1); }}, show: function(i){ var self=this; activePortfolioAjaxOnPage=null; if(self.$ajaxBoxContent.find('.rev_slider').get(0)){ try {self.$ajaxBoxContent.find('.rev_slider').revkill();} catch(err){}} self.$ajaxBoxContent.empty(); self.$ajaxBox.removeClass('ajax-box-init').addClass('ajax-box-loading'); theme.scrolltoContainer(self.$ajaxBox); self.currentPage=i; if(i < 0||i > (self.total-1)){ self.close(); return false; } $.ajax({ url: self.pages[i], complete: function(data){ var $response=$(data.responseText), $portfolio=$response.find('#content article.portfolio'), $vc_css=$response.filter('style[data-type]:not("")'), vc_css=''; if($('#portfolioAjaxCSS').get(0)){ $('#portfolioAjaxCSS').text(vc_css); }else{ $('').appendTo("head") } $portfolio.find('.portfolio-nav-all').html(''); $portfolio.find('.portfolio-nav').html(''); self.$ajaxBoxContent.html($portfolio.html()).append('

    '); self.$ajaxBox.removeClass('ajax-box-loading'); $(window).trigger('resize'); porto_init(); theme.refreshVCContent(self.$ajaxBoxContent); self.events(); activePortfolioAjaxOnPage=self; }}); }}; portfolioAjaxOnPage.build(); $this.data('portfolioAjaxOnPage', portfolioAjaxOnPage); }); return self; }} }); $(document.documentElement).on('keyup', function(e){ try { if(!activePortfolioAjaxOnPage) return; if(e.keyCode==39){ activePortfolioAjaxOnPage.next(); } if(e.keyCode==37){ activePortfolioAjaxOnPage.prev(); }} catch(err){}}); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var $rev_sliders; $.extend(theme, { PortfolioAjaxModal: { defaults: { elements: '.page-portfolios' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); if(!$this.find('a[data-ajax-on-modal]').get(0)) return; var $container=$(this), portfolioAjaxOnModal={ $wrapper: $container, modals: [], currentModal: 0, total: 0, build: function(){ var self=this; self.modals=[]; self.total=0; $this.find('a[data-ajax-on-modal]').each(function(){ self.add($(this)); }); $this.off('mousedown', 'a[data-ajax-on-modal]').on('mousedown', 'a[data-ajax-on-modal]', function (ev){ if(ev.which==2){ ev.preventDefault(); return false; }}); }, add: function($el){ var self=this, href=$el.attr('href'), index=self.total; self.modals.push({src: href}); self.total++; $el.off('click').on('click', function(e){ e.preventDefault(); self.show(index); return false; }); }, next: function(){ var self=this; if(self.currentModal + 1 < self.total){ self.show(self.currentModal + 1); }else{ self.show(0); }}, prev: function(){ var self=this; if((self.currentModal - 1) >=0){ self.show(self.currentModal - 1); }else{ self.show(self.total - 1); }}, show: function(i){ var self=this; self.currentModal=i; if(i < 0||i > (self.total-1)){ return false; } $.magnificPopup.close(); $.magnificPopup.open($.extend(true, {}, theme.mfpConfig, { type: 'ajax', items: self.modals, gallery: { enabled: true }, ajax: { settings: { type: 'post', data: { ajax_action: 'portfolio_ajax_modal' }} }, mainClass: 'portfolio-ajax-modal', fixedContentPos: false, callbacks: { parseAjax: function(mfpResponse){ var $response=$(mfpResponse.data), $portfolio=$response.find('#content article.portfolio'), $vc_css=$response.filter('style[data-type]:not("")'), vc_css=''; $vc_css.each(function(){ vc_css +=$(this).text(); }); if($('#portfolioAjaxCSS').get(0)){ $('#portfolioAjaxCSS').text(vc_css); }else{ $('').appendTo("head") } $portfolio.find('.portfolio-nav-all').html(''); $portfolio.find('.portfolio-nav').html(''); mfpResponse.data='
    ' + $portfolio.html() + '
    '; }, ajaxContentAdded: function(){ var $wrapper=$('.portfolio-ajax-modal'); $wrapper.find('a[data-ajax-portfolio-close]').on('click', function(e){ e.preventDefault(); $.magnificPopup.close(); return false; }); $rev_sliders=$wrapper.find('.rev_slider'); if(self.modals.length <=1){ $wrapper.find('a[data-ajax-portfolio-prev], a[data-ajax-portfolio-next]').remove(); }else{ $wrapper.find('a[data-ajax-portfolio-prev]').on('click', function(e){ e.preventDefault(); if($rev_sliders&&$rev_sliders.get(0)){ try {$rev_sliders.revkill();} catch(err){}} $wrapper.find('.mfp-arrow-left').trigger('click'); return false; }); $wrapper.find('a[data-ajax-portfolio-next]').on('click', function(e){ e.preventDefault(); if($rev_sliders&&$rev_sliders.get(0)){ try {$rev_sliders.revkill();} catch(err){}} $wrapper.find('.mfp-arrow-right').trigger('click'); return false; }); } $(window).trigger('resize'); porto_init(); theme.refreshVCContent($wrapper); setTimeout(function(){ var videos=$wrapper.find('video'); if(videos.get(0)){ videos.each(function(){ $(this)[0].play(); $(this).parent().parent().parent().find('.video-controls').attr('data-action','play'); $(this).parent().parent().parent().find('.video-controls').html(''); }); }}, 600); $wrapper.off('scroll').on('scroll', function(){ $.fn.appear.run(); }); }, change: function(){ $('.mfp-wrap .ajax-container').click(); }, beforeClose: function(){ if($rev_sliders&&$rev_sliders.get(0)){ try {$rev_sliders.revkill();} catch(err){}} var $wrapper=$('.portfolio-ajax-modal'); $wrapper.off('scroll'); }} }), i); }}; portfolioAjaxOnModal.build(); $this.data('portfolioAjaxOnModal', portfolioAjaxOnModal); }); return self; }} }); $(document.documentElement).on('keydown', function(e){ try { if(e.keyCode==37||e.keyCode==39){ if($rev_sliders&&$rev_sliders.get(0)){ $rev_sliders.revkill(); }} } catch(err){}}); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { PortfolioFilter: { defaults: { elements: '.portfolio-filter' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); $this.find('li').on('click', function(e){ e.preventDefault(); var selector=$(this).attr('data-filter'), position=$this.data('position'), $parent; $this.find('.active').removeClass('active'); if(position=='sidebar'){ $parent=$('.main-content .page-portfolios'); $('.sidebar-overlay').click(); }else if(position=='global'){ $parent=$('.main-content .page-portfolios'); }else{ $parent=$(this).closest('.page-portfolios'); } if($parent.hasClass('portfolios-timeline')){ var selected=0; $parent.find('.portfolio').each(function(){ var $that=$(this), easing="easeInOutQuart", timeout=300; if(selector=='*'){ if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){ $(this).attr('style', '').show(); }); selected++; }else{ if($that.hasClass(selector)){ if($that.css('display')=='none') $that.stop(true).slideDown(timeout, easing, function(){ $(this).attr('style', '').show(); }); selected++; }else{ if($that.css('display')!='none') $that.stop(true).slideUp(timeout, easing, function(){ $(this).attr('style', '').hide(); }); }} }); if(!selected&&$parent.find('.portfolios-infinite').length&&typeof ($.fn.infinitescroll)!='undefined'){ $parent.find('.portfolios-infinite').infinitescroll('retrieve'); } setTimeout(function(){ theme.FilterZoom.initialize($parent); }, 400); }else{ $parent.find('.portfolio-row').isotope({ filter: selector=='*' ? selector:'.' + selector }); } $(this).addClass('active'); if(position=='sidebar'){ self.$elements.each(function(){ var $that=$(this); if($that==$this&&$that.data('position')!='sidebar') return; $that.find('li').removeClass('active'); $that.find('li[data-filter="' + selector + '"]').addClass('active'); }); } window.location.hash='#' + selector; theme.refreshVCContent(); }); }); function hashchange(){ var $filter=$(self.$elements.get(0)), hash=window.location.hash; if(hash){ $filter.find('li[data-filter="' + hash.replace('#', '') + '"]').click(); }} $(window).on('hashchange', hashchange); hashchange(); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var activeMemberAjaxOnPage; $.extend(theme, { MemberAjaxPage: { defaults: { elements: '.page-members' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); if(!$this.find('#memberAjaxBox').get(0)) return; var $container=$(this), memberAjaxOnPage={ $wrapper: $container, pages: [], currentPage: 0, total: 0, $ajaxBox: $this.find('#memberAjaxBox'), $ajaxBoxContent: $this.find('#memberAjaxBoxContent'), build: function(){ var self=this; self.pages=[]; self.total=0; $this.find('a[data-ajax-on-page]').each(function(){ self.add($(this)); }); $this.off('mousedown', 'a[data-ajax-on-page]').on('mousedown', 'a[data-ajax-on-page]', function (ev){ if(ev.which==2){ ev.preventDefault(); return false; }}); }, add: function($el){ var self=this, href=$el.attr('href'); self.pages.push(href); self.total++; $el.off('click').on('click', function(e){ e.preventDefault(); self.show(self.pages.indexOf(href)); return false; }); }, next: function(){ var self=this; if(self.currentPage + 1 < self.total){ self.show(self.currentPage + 1); }else{ self.show(0); }}, prev: function(){ var self=this; if((self.currentPage - 1) >=0){ self.show(self.currentPage - 1); }else{ self.show(self.total - 1); }}, show: function(i){ var self=this; activeMemberAjaxOnPage=null; if(self.$ajaxBoxContent.find('.rev_slider').get(0)){ try {self.$ajaxBoxContent.find('.rev_slider').revkill();} catch(err){}} self.$ajaxBoxContent.empty(); self.$ajaxBox.removeClass('ajax-box-init').addClass('ajax-box-loading'); theme.scrolltoContainer(self.$ajaxBox); self.currentPage=i; if(i < 0||i > (self.total-1)){ self.close(); return false; } $.ajax({ url: self.pages[i], complete: function(data){ var $response=$(data.responseText), $member=$response.find('#content article.member'), $vc_css=$response.filter('style[data-type]:not("")'), vc_css=''; $vc_css.each(function(){ vc_css +=$(this).text(); }); if($('#memberAjaxCSS').get(0)){ $('#memberAjaxCSS').text(vc_css); }else{ $('').appendTo("head") } var $append=self.$ajaxBox.find('.ajax-content-append'), html=''; if($append.length) html=$append.html(); self.$ajaxBoxContent.html($member.html()).prepend('

    ').append('

    ' + html); self.$ajaxBox.removeClass('ajax-box-loading'); $(window).trigger('resize'); porto_init(); theme.refreshVCContent(self.$ajaxBoxContent); activeMemberAjaxOnPage=self; }}); }}; memberAjaxOnPage.build(); $this.data('memberAjaxOnPage', memberAjaxOnPage); }); return self; }} }); $(document.documentElement).on('keyup', function(e){ try { if(!activeMemberAjaxOnPage) return; if(e.keyCode==39){ activeMemberAjaxOnPage.next(); } if(e.keyCode==37){ activeMemberAjaxOnPage.prev(); }} catch(err){}}); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var $rev_sliders; $.extend(theme, { MemberAjaxModal: { defaults: { elements: '.page-members' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); if(!$this.find('a[data-ajax-on-modal]').get(0)) return; var $container=$(this), memberAjaxOnModal={ $wrapper: $container, modals: [], currentModal: 0, total: 0, build: function(){ var self=this; self.modals=[]; self.total=0; $this.find('a[data-ajax-on-modal]').each(function(){ self.add($(this)); }); $this.off('mousedown', 'a[data-ajax-on-modal]').on('mousedown', 'a[data-ajax-on-modal]', function (ev){ if(ev.which==2){ ev.preventDefault(); return false; }}); }, add: function($el){ var self=this, href=$el.attr('href'), index=self.total; self.modals.push({src: href}); self.total++; $el.off('click').on('click', function(e){ e.preventDefault(); self.show(index); return false; }); }, next: function(){ var self=this; if(self.currentModal + 1 < self.total){ self.show(self.currentModal + 1); }else{ self.show(0); }}, prev: function(){ var self=this; if((self.currentModal - 1) >=0){ self.show(self.currentModal - 1); }else{ self.show(self.total - 1); }}, show: function(i){ var self=this; self.currentModal=i; if(i < 0||i > (self.total-1)){ return false; } $.magnificPopup.close(); $.magnificPopup.open($.extend(true, {}, theme.mfpConfig, { type: 'ajax', items: self.modals, gallery: { enabled: true }, ajax: { settings: { type: 'post', data: { ajax_action: 'member_ajax_modal' }} }, mainClass: 'member-ajax-modal', fixedContentPos: false, callbacks: { parseAjax: function(mfpResponse){ var $response=$(mfpResponse.data), $member=$response.find('#content article.member'), $vc_css=$response.filter('style[data-type]:not("")'), vc_css=''; $vc_css.each(function(){ vc_css +=$(this).text(); }); if($('#memberAjaxCSS').get(0)){ $('#memberAjaxCSS').text(vc_css); }else{ $('').appendTo("head") } $member.find('.member-nav-all').html(''); $member.find('.member-nav').html(''); mfpResponse.data='
    ' + $member.html() + '
    '; }, ajaxContentAdded: function(){ var $wrapper=$('.member-ajax-modal'); $wrapper.find('a[data-ajax-member-close]').on('click', function(e){ e.preventDefault(); $.magnificPopup.close(); return false; }); $rev_sliders=$wrapper.find('.rev_slider'); if(self.modals.length <=1){ $wrapper.find('a[data-ajax-member-prev], a[data-ajax-member-next]').remove(); }else{ $wrapper.find('a[data-ajax-member-prev]').on('click', function(e){ e.preventDefault(); if($rev_sliders&&$rev_sliders.get(0)){ try {$rev_sliders.revkill();} catch(err){}} $wrapper.find('.mfp-arrow-left').trigger('click'); return false; }); $wrapper.find('a[data-ajax-member-next]').on('click', function(e){ e.preventDefault(); if($rev_sliders&&$rev_sliders.get(0)){ try {$rev_sliders.revkill();} catch(err){}} $wrapper.find('.mfp-arrow-right').trigger('click'); return false; }); } $(window).trigger('resize'); porto_init(); theme.refreshVCContent($wrapper); setTimeout(function(){ $(window).trigger('resize'); var videos=$wrapper.find('video'); if(videos.get(0)){ videos.each(function(){ $(this)[0].play(); $(this).parent().parent().parent().find('.video-controls').attr('data-action','play'); $(this).parent().parent().parent().find('.video-controls').html(''); }); }}, 600); $wrapper.off('scroll').on('scroll', function(){ $.fn.appear.run(); }); }, change: function(){ $('.mfp-wrap .ajax-container').click(); }, beforeClose: function(){ if($rev_sliders&&$rev_sliders.get(0)){ try {$rev_sliders.revkill();} catch(err){}} var $wrapper=$('.member-ajax-modal'); $wrapper.off('scroll'); }} }), i); }}; memberAjaxOnModal.build(); $this.data('memberAjaxOnModal', memberAjaxOnModal); }); return self; }} }); $(document.documentElement).on('keydown', function(e){ try { if(e.keyCode==37||e.keyCode==39){ if($rev_sliders&&$rev_sliders.get(0)){ $rev_sliders.revkill(); }} } catch(err){}}); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { MemberFilter: { defaults: { elements: '.member-filter' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); $this.find('li').on('click', function(e){ e.preventDefault(); var selector=$(this).attr('data-filter'), position=$this.data('position'), $parent; $this.find('.active').removeClass('active'); if(position=='sidebar'){ $parent=$('.main-content .page-members'); theme.scrolltoContainer($parent); $('.sidebar-overlay').click(); }else if(position=='global'){ $parent=$('.main-content .page-members'); }else{ $parent=$(this).closest('.page-members'); } $parent.find('.member-row').isotope({ filter: selector=='*' ? selector:'.' + selector }); $(this).addClass('active'); if(position=='sidebar'){ self.$elements.each(function(){ var $that=$(this); if($that==$this&&$that.data('position')!='sidebar') return; $that.find('li').removeClass('active'); $that.find('li[data-filter="' + selector + '"]').addClass('active'); }); } window.location.hash='#' + selector; theme.refreshVCContent(); }); }); function hashchange(){ var $filter=$(self.$elements.get(0)), hash=window.location.hash; if(hash){ $filter.find('li[data-filter="' + hash.replace('#', '') + '"]').click(); }} $(window).on('hashchange', hashchange); hashchange(); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { SortFilter: { defaults: { filters: '.porto-sort-filters ul', elements: '.porto-sort-container .row' }, initialize: function($elements, $filters){ this.$elements=($elements||$(this.defaults.elements)); this.$filters=($filters||$(this.defaults.filters)); this.build(); return this; }, build: function(){ var self=this; self.$elements.each(function(){ var $this=$(this); $this.isotope({ itemSelector: '.porto-sort-item', layoutMode: 'masonry', getSortData: { popular: '[data-popular] parseInt' }, sortBy: 'popular', isOriginLeft:!theme.rtl }); $this.waitForImages(function(){ if($this.data('isotope')){ $this.isotope('layout'); }}); }); self.$filters.each(function(){ var $this=$(this); var id=$this.attr('data-sort-id'); var $container=$('#' + id); if($container.length){ $this.on('click', 'li', function(e){ e.preventDefault(); var $that=$(this); $this.find('li').removeClass('active'); $that.addClass("active"); var sortByValue=$that.attr('data-sort-by'); $container.isotope({sortBy: sortByValue}); var filterByValue=$that.attr('data-filter-by'); if(filterByValue){ $container.isotope({filter: filterByValue}); }else{ $container.isotope({filter: '.porto-sort-item'}); } theme.refreshVCContent(); }); $this.find('li[data-active]').click(); }}); return self; }} }); }).apply(this, [window.theme, jQuery]); function porto_init(){ jQuery(window).on('touchstart',function(){}); (function($){ 'use strict'; if($.isFunction($.fn['themeAccordion'])){ $(function(){ $('.accordion:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeAccordion(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeAccordionMenu'])){ $(function(){ $('.accordion-menu:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeAccordionMenu(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeAnimate'])){ $(function(){ $('[data-plugin-animate], [data-appear-animation]').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeAnimate(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeCarousel'])){ $(function(){ $('[data-plugin-carousel]:not(.manual), .porto-carousel:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeCarousel(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeChartCircular'])){ $(function(){ $('[data-plugin-chart-circular]:not(.manual), .circular-bar-chart:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeChartCircular(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeFitVideo'])){ $(function(){ $('.fit-video:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeFitVideo(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themePluginVideoBackground'])){ $(function(){ $('[data-plugin-video-background]:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=JSON.parse($this.data('plugin-options').replace(/'/g,'"').replace(';','')); if(pluginOptions) opts=pluginOptions; $this.themePluginVideoBackground(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themePluginWordRotate'])){ $(function(){ $('[data-plugin-word-rotate]:not(.manual), .word-rotate:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=JSON.parse($this.data('plugin-options').replace(/'/g,'"').replace(';','')); if(pluginOptions) opts=pluginOptions; $this.themePluginWordRotate(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeFlickrZoom'])){ $(function(){ $('.wpb_flickr_widget:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeFlickrZoom(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themePluginLazyLoad'])){ $(function(){ $('[data-plugin-lazyload]:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themePluginLazyLoad(opts); }); $('.porto-lazyload').themePluginLazyLoad({effect: 'fadeIn', effect_speed: 400}); if($('.porto-lazyload').closest('.nivoSlider').length){ setTimeout(function(){ $('.nivoSlider').each(function(){ if($(this).find('.porto-lazyload').length){ $(this).closest('.nivoSlider').find('.nivo-main-image').attr('src', $(this).closest('.nivoSlider').find('.porto-lazyload').eq(0).attr('src')); }}); }, 100); } if($('.porto-lazyload').closest('.porto-carousel-wrapper').length){ setTimeout(function(){ $('.porto-carousel-wrapper').each(function(){ if($(this).find('.porto-lazyload:not(.lazy-load-loaded)').length){ $(this).find('.slick-list').css('height', 'auto'); $(this).find('.porto-lazyload:not(.lazy-load-loaded)').trigger('appear'); }}); }, 100); }}); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeLightbox'])){ $(function(){ $('[data-plugin-lightbox]:not(.manual), .lightbox:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeLightbox(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeMasonry'])){ $(function(){ $('[data-plugin-masonry]:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeMasonry(opts); }); $('.posts-masonry .posts-container:not(.manual)').each(function(){ $(this).themeMasonry({ itemSelector: '.post' }); }); $('.page-portfolios .portfolio-row:not(.manual)').each(function(){ if($(this).closest('.porto-grid-container').length > 0){ return; } var $parent=$(this).parent(), layoutMode='masonry', options, columnWidth='.portfolio:not(.w2)', timer=null; if($parent.hasClass('portfolios-grid')){ layoutMode='fitRows'; }else if($parent.hasClass('portfolios-masonry')){ $parent.append('
    '); } options={ itemSelector: '.portfolio', layoutMode: layoutMode, callback: function(){ timer&&clearTimeout(timer); timer=setTimeout(function(){ theme.FilterZoom.initialize($('.page-portfolios')); $parent.addClass('portfolio-iso-active'); }, 400); }}; if(layoutMode=='masonry'){ if(!$parent.find('.portfolio:not(.w2)').length) columnWidth='.portfolio'; options=$.extend(true, {}, options, { masonry: { columnWidth: columnWidth }}); } $(this).themeMasonry(options); }); $('.page-members .member-row:not(.manual)').each(function(){ $(this).themeMasonry({ itemSelector: '.member', layoutMode: 'fitRows', callback: function(){ setTimeout(function(){ theme.FilterZoom.initialize($('.page-members')); }, 400); }}); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themePreviewImage'])){ $(function(){ $('.thumb-info-preview .thumb-info-image:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themePreviewImage(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeRefreshVideoSize'])){ $(function(){ $('.video-cover:not(.manual) .upb_video-bg').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeRefreshVideoSize(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeToggle'])){ $(function(){ $('section.toggle:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeToggle(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeParallax'])){ $(function(){ $('[data-plugin-parallax]:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeParallax(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeVcImageZoom'])){ $(function(){ var $galleryParent=null; $('.porto-vc-zoom:not(.manual)').each(function(){ var $this=$(this), opts, gallery=$this.attr('data-gallery'); var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; if(typeof opts=="undefined"){ opts={};} opts.container=$this.parent(); if(gallery=='true'){ var container='vc_row'; if($this.attr('data-container')) container=$this.attr('data-container'); var $parent=$($this.closest('.' + container).get(0)); if($parent.length > 0&&$galleryParent!=null&&$galleryParent.is($parent)){ return; }else if($parent.length > 0){ $galleryParent=$parent; } if($galleryParent!=null&&$galleryParent.length > 0){ opts.container=$galleryParent; }} $this.themeVcImageZoom(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeSticky'])){ $(function(){ $('[data-plugin-sticky]:not(.manual), .porto-sticky:not(.manual), .porto-sticky-nav:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeSticky(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['tooltip'])){ $("[data-tooltip]:not(.manual), [data-toggle='tooltip']:not(.manual), .star-rating:not(.manual)").tooltip(); } $('[data-toggle="dropdown_hover"]').dropdownHover(); $('a[data-toggle="tab"]').on('shown.bs.tab', function (e){ $(this).parents('.nav-tabs').find('.active').removeClass('active'); $(this).addClass('active').parent().addClass('active'); }); if($().waypoint){ $('.vc_progress_bar').each(function(){ var $tooltips=$(this).find('.progress-bar-tooltip'); $($tooltips.get(0)).waypoint(function(){ var delay=200; $tooltips.each(function(index){ var $tooltip=$(this); setTimeout(function(){ $tooltip.animate({ opacity: 1 }); }, 200 + delay * index); }); }, { offset: '85%' }); }); } $('.video-fixed').each(function(){ var $this=$(this), $video=$this.find('video, iframe'); if($video.length){ $(window).on('scroll', function(){ var offset=$(window).scrollTop() - $this.position().top + theme.adminBarHeight(); $video.css("cssText", "top: " + offset + "px !important;"); }); }}); $('.porto-popup-iframe').magnificPopup($.extend(true, {}, theme.mfpConfig, { disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false })); $('.porto-popup-ajax').magnificPopup($.extend(true, {}, theme.mfpConfig, { type: 'ajax' })); $('.porto-popup-content').each(function(){ var animation=$(this).attr('data-animation'); $(this).magnificPopup($.extend(true, {}, theme.mfpConfig, { type: 'inline', fixedContentPos: false, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: animation })); }); $('.thumb-gallery-thumbs').each(function(){ var $thumbs=$(this), $detail=$thumbs.parent().find('.thumb-gallery-detail'), flag=false, duration=300; if($thumbs.data('initThumbs')) return; $detail.on('changed.owl.carousel', function(e){ if(!flag){ flag=true; var len=$detail.find('.owl-item').length, cloned=$detail.find('.cloned').length; if(len){ $thumbs.trigger('to.owl.carousel', [(e.item.index - cloned / 2 - 1) % len, duration, true]); } flag=false; }}); $thumbs.on('changed.owl.carousel', function(e){ if(!flag){ flag=true; var len=$thumbs.find('.owl-item').length, cloned=$thumbs.find('.cloned').length; if(len){ $detail.trigger('to.owl.carousel', [(e.item.index - cloned / 2) % len, duration, true]); } flag=false; }}).on('click', '.owl-item', function(){ if(!flag){ flag=true; var len=$thumbs.find('.owl-item').length, cloned=$thumbs.find('.cloned').length; if(len){ $detail.trigger('to.owl.carousel', [($(this).index() - cloned / 2) % len, duration, true]); } flag=false; }}).data('initThumbs', true); }); }).apply(this, [jQuery]); } (function(theme, $){ 'use strict'; $(document).ready(function(){ porto_init(); if(typeof theme.ScrollToTop!=='undefined'){ theme.ScrollToTop.initialize(); } if(typeof theme.MegaMenu!=='undefined'){ theme.MegaMenu.initialize(); } $(window).on('load', function(){ setTimeout(function(){ theme.MegaMenu.build(); }, 800); }); if(typeof theme.SidebarMenu!=='undefined'){ theme.SidebarMenu.initialize(); $('.sidebar-menu.side-menu-accordion').themeAccordionMenu({'open_one':true}); } if(typeof theme.SideNav!=='undefined'){ theme.SideNav.initialize(); } if(typeof theme.StickyHeader!=='undefined'){ theme.StickyHeader.initialize(); } if(typeof theme.Search!=='undefined'){ theme.Search.initialize(); } if(typeof theme.HashScroll!=='undefined'){ theme.HashScroll.initialize(); } if(typeof theme.PortfolioAjaxPage!=='undefined'){ theme.PortfolioAjaxPage.initialize(); } if(typeof theme.PortfolioAjaxModal!=='undefined'){ theme.PortfolioAjaxModal.initialize(); } if(typeof theme.PortfolioFilter!=='undefined'){ theme.PortfolioFilter.initialize(); } if(typeof theme.MemberAjaxPage!=='undefined'){ theme.MemberAjaxPage.initialize(); } if(typeof theme.MemberAjaxModal!=='undefined'){ theme.MemberAjaxModal.initialize(); } if(typeof theme.MemberFilter!=='undefined'){ theme.MemberFilter.initialize(); } if(typeof theme.FaqFilter!=='undefined'){ theme.FaqFilter.initialize(); } if(typeof theme.FilterZoom!=='undefined'){ theme.FilterZoom.initialize($('.page-portfolios')); theme.FilterZoom.initialize($('.page-members')); theme.FilterZoom.initialize($('.blog-posts-related')); } if(typeof theme.SortFilter!=='undefined'){ theme.SortFilter.initialize(); } $(document).on('click', '.sidebar-toggle', function(e){ var $html=$('html'); if($(this).closest('.porto-product-filters').length){ if($html.hasClass('filter-sidebar-opened')){ $html.removeClass('filter-sidebar-opened'); $('.sidebar-overlay').removeClass('active'); }else{ $html.addClass('filter-sidebar-opened'); $('.sidebar-overlay').addClass('active'); }}else{ if($html.hasClass('sidebar-opened')){ $html.removeClass('sidebar-opened'); $('.sidebar-overlay').removeClass('active'); }else{ $html.addClass('sidebar-opened'); $('.sidebar-overlay').addClass('active'); }} }); $(document.body).on('click', '.sidebar-overlay', function(){ $('html').removeClass('sidebar-opened'); $('html').removeClass('filter-sidebar-opened'); $(this).removeClass('active'); }); $(window).on('resize', function(){ if($(window).width() > 991 - theme.getScrollbarWidth()){ $('.sidebar-overlay').click(); }}); if($.isFunction($.fn['matchHeight'])){ $('.tabs-simple .featured-box .box-content').matchHeight(); $('.porto-content-box .featured-box .box-content').matchHeight(); $('.vc_general.vc_cta3').matchHeight(); $('.match-height').matchHeight(); } if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ $('.share-whatsapp').css('display', 'inline-block'); } $(document).ajaxComplete(function(event, xhr, options){ if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ $('.share-whatsapp').css('display', 'inline-block'); }}); var ua=window.navigator.userAgent, ie12=ua.indexOf('Edge/') > 0; if(ie12) $('html').addClass('ie12'); if(!$('#yith-wcwl-popup-message').get(0)){ var message_div=$('
    ') .attr('id', 'yith-wcwl-message'), popup_div=$('
    ') .attr('id', 'yith-wcwl-popup-message') .html(message_div) .hide(); $('body').prepend(popup_div); } $(document).on('click', '.portfolios-lightbox a.portfolio-link', function(e){ $(this).find('.thumb-info-zoom').click(); return false; }); $(document).on('click', '.porto-portfolios .pagination:not(.load-more) a', function(e){ var $this=$(this), url=$this.attr('href'), shortcode_id=$this.closest('.porto-portfolios').find('.shortcode-id').val(), $container=$this.closest('.porto-portfolios' + shortcode_id); if(url){ e.preventDefault(); $container.addClass('porto-ajax-loading'); if(!$container.children('.porto-loading-icon').length){ $container.append(''); } setTimeout(function(){ $('html, body').stop().animate({ scrollTop: $container.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 14 }, 600, 'easeOutQuad'); }, 200); $.ajax({ type:'post', url:url, success: function(response){ var $response_container=$('
    ' + response + '
    ').find('.porto-portfolios'+shortcode_id); $container.html($response_container.html()); theme.PortfolioAjaxPage.initialize($container.find('.page-portfolios')); theme.PortfolioAjaxModal.initialize($container.find('.page-portfolios')); porto_init(); theme.PortfolioFilter.initialize($container.find('.portfolio-filter')); }}).always(function(){ $container.removeClass('porto-ajax-loading'); }); return false; }}); $(document).on('click', '.porto-members .pagination a', function(e){ var $this=$(this), url=$this.attr('href'), shortcode_id=$this.closest('.porto-members').find('.shortcode-id').val(), $container=$this.closest('.porto-members' + shortcode_id); if(url){ e.preventDefault(); $container.addClass('porto-ajax-loading'); if(!$container.children('.porto-loading-icon').length){ $container.append(''); } setTimeout(function(){ $('html, body').stop().animate({ scrollTop: $container.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 14 }, 600, 'easeOutQuad'); }, 200); $.ajax({ type:'post', url:url, success: function(response){ var $response_container=$('
    ' + response + '
    ').find('.porto-members'+shortcode_id); $container.html($response_container.html()); theme.MemberAjaxPage.initialize($container.find('.page-members')); theme.MemberAjaxModal.initialize($container.find('.page-members')); porto_init(); theme.MemberFilter.initialize($container.find('.member-filter')); }}).always(function(){ $container.removeClass('porto-ajax-loading'); }); return false; }}); $(document).on('click', '.porto-faqs .pagination a', function(e){ var $this=$(this), url=$this.attr('href'), shortcode_id=$this.closest('.porto-faqs').find('.shortcode-id').val(), $container=$this.closest('.porto-faqs' + shortcode_id); if(url){ e.preventDefault(); $container.addClass('porto-ajax-loading'); if(!$container.children('.porto-loading-icon').length){ $container.append(''); } setTimeout(function(){ $('html, body').stop().animate({ scrollTop: $container.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 14 }, 600, 'easeOutQuad'); }, 200); $.ajax({ type:'post', url:url, success: function(response){ var $response_container=$('
    ' + response + '
    ').find('.porto-faqs'+shortcode_id); $container.html($response_container.html()); porto_init(); theme.FaqFilter.initialize($container.find('.faq-filter')); }}).always(function(){ $container.removeClass('porto-ajax-loading'); }); return false; }}); $('.porto-faqs').each(function(){ if($(this).find('.faq .toggle.active').length < 1){ $(this).find('.faq').eq(0).find('.toggle').addClass('active'); $(this).find('.faq').eq(0).find('.toggle-content').show(); }}); $(document).on('shown.bs.collapse', '.collapse', function(){ var panel=$(this); theme.refreshVCContent(panel); }); $(document).on('shown.bs.tab', 'a[data-toggle="tab"]', function(e){ var panel=$($(e.target).attr('href')); theme.refreshVCContent(panel); }); $(".porto-tooltip .tooltip-icon").click(function(){ if($(this).parent().children(".tooltip-popup").css("display")=="none"){ $(this).parent().children(".tooltip-popup").fadeIn(200); }else{ $(this).parent().children(".tooltip-popup").fadeOut(200); }}); $(".porto-tooltip .tooltip-close").click(function(){ $(this).parent().fadeOut(200); }); }); }).apply(this, [window.theme, jQuery]); (function (theme, $, undefined){ "use strict"; $(document).ready(function(){ $(window).bind('vc_reload', function(){ porto_init(); $('.type-post').addClass('post'); $('.type-portfolio').addClass('portfolio'); $('.type-member').addClass('member'); $('.type-block').addClass('block'); }); }); /*if(theme.rtl){ $(document).bind('vc-full-width-row', function(){ $('[data-vc-full-width="true"]').each(function(){ var $this=$(this), left=$this.css('left'); $this.css('right', left); $this.css('left', 'auto'); }); }); }*/ var masonryContainer, masonryOptions; $(document).on('click', '.porto-portfolios .pagination.load-more a', function(e){ var $this=$(this), url=$this.attr('href'), shortcode_id=$this.closest('.porto-portfolios').find('.shortcode-id').val(), $container=$this.closest('.porto-portfolios' + shortcode_id), $loader=$container.find('.pagination-wrap.load-more .bounce-loader'), $btn=$container.find('.pagination.load-more a.next'); if(url){ e.preventDefault(); $btn.hide(); $loader.show(); $.ajax({ type:'post', url:url, success: function(response){ var $response_container=$('
    ' + response + '
    ').find('.porto-portfolios'+shortcode_id), $portfolio_thumbs=$response_container.find('.porto-portfolios-lighbox-thumbnails .owl-carousel').html(), $next_posts=$response_container.find('.portfolio-row').children('article.portfolio'); $container.find('.pagination-wrap').replaceWith($response_container.find('.pagination-wrap')); $container.find('.porto-portfolios-lighbox-thumbnails .owl-carousel').append($portfolio_thumbs); if($next_posts.length){ var $iso=$container.find('.page-portfolios').find('.portfolio-row'); $iso.isotope('insert', $next_posts); $iso.waitForImages(function(){ $iso.isotope('layout'); }); }else if($response_container.find('.portfolios-timeline').length){ $next_posts=$response_container.find('.portfolios-timeline .timeline-body'); var $first_timeline_date=$next_posts.children('.timeline-date:first-child'), $last_date=$container.find('.timeline-body').children('.timeline-date').last(); if($last_date.length&&$first_timeline_date.length&&$last_date.html()==$first_timeline_date.html()){ $next_posts.children('.timeline-date:first-child').remove(); } $container.find('.timeline-body').append($next_posts.children()); } theme.PortfolioAjaxPage.initialize($('.page-portfolios')); theme.PortfolioAjaxModal.initialize($('.page-portfolios')); porto_init(); theme.PortfolioFilter.initialize($('.portfolio-filter')); $container.find('.porto-lazyload:not(.lazy-load-loaded)').trigger('appear'); }}).always(function(){ $loader.hide(); }); return false; }}); $(window).bind('resizeEnd', function(){ $(masonryContainer).masonry('reloadItems'); $(masonryContainer).masonry('layout'); }); $(window).resize(function(){ if(this.resizeTO) clearTimeout(this.resizeTO); this.resizeTO=setTimeout(function(){ $(this).trigger('resizeEnd'); }, 700); }); var timelineHeightAdjust={ $timeline: $('#exp-timeline'), $timelineBar: $('#exp-timeline .timeline-bar'), $firstTimelineItem: $('#exp-timeline .timeline-box').first(), $lastTimelineItem: $('#exp-timeline .timeline-box').last(), build: function(){ var self=this; self.adjustHeight(); }, adjustHeight: function(){ var self=this, calcFirstItemHeight=(self.$firstTimelineItem.outerHeight(true) / 2) + 5, calcLastItemHeight=(self.$lastTimelineItem.outerHeight(true) / 2) + 5; self.$timelineBar.css({ top: calcFirstItemHeight, bottom: calcLastItemHeight }); }} if($('#exp-timeline').get(0)){ setTimeout(function(){ $(window).bind('resizeEnd',function(){ timelineHeightAdjust.build(); }); }, 1000); timelineHeightAdjust.build(); } $('.custom-view-our-location').on('click',function(e){ e.preventDefault(); var this_=$(this); $('.custom-googlemap').slideDown('1000', function(){ setTimeout(function (){ this_.hide(); }, 700); }); }); })(window.theme, jQuery); (function (theme, $, undefined){ $(document).ready(function(e){ porto_headings_init(); $(window).resize(function(e){ porto_headings_init(); }); }); $(window).on('load', function(e){ porto_headings_init(); }); function porto_headings_init(){ var fixer=0; $('.porto-u-heading').each(function(){ var icon_height, icon_width, line_width; var wrapper_width=$(this).outerWidth(); var hline_width=$(this).attr('data-hline_width'); var icon_type=$(this).attr('data-hicon_type'); var align=$(this).attr('data-halign'); var spacer=$(this).attr('data-hspacer'); left_rtl='left'; right_rtl='right'; if(jQuery('body').hasClass('rtl')){ left_rtl='right'; right_rtl='left'; } if(spacer=='line_only'){ if(align=='right'||align=='left'){ $(this).find('.porto-u-heading-spacer').find('.porto-u-headings-line').css({'float':align}); }else{ $(this).find('.porto-u-heading-spacer').find('.porto-u-headings-line').css({'margin':'0 auto'}); }} }); } jQuery(document).ready(function($){ $('.popup-youtube, .popup-vimeo, .popup-gmaps').each(function(index){ var overlayClass=$(this).find('.porto-modal-trigger').data('overlay-class'), args={ type: 'iframe', removalDelay: 160, preloader: false, fixedContentPos: false }; if(typeof overlayClass!="undefined"&&overlayClass){ args.mainClass=escape(overlayClass); } $(this).magnificPopup(args); }); function porto_modal_open($this){ var trigger=$this.data('trigger-id'), overlayClass=$this.data('overlay-class'), type=$this.data('type'); if(typeof trigger!='undefined'){ if(typeof type=='undefined'){ type='inline'; } if(type=='inline'){ trigger='#' + escape(trigger); } var args={ items: { src: trigger }, type: type, }; if($this.hasClass('porto-onload')){ args['callbacks']={ 'beforeClose': function(){ if($('.mfp-wrap .porto-modal-content .porto-disable-modal-onload').length&&$('.mfp-wrap .porto-modal-content .porto-disable-modal-onload').is(':checked')){ $.cookie('porto_modal_disable_onload', 'true', { expires:7 }); }} };} if(typeof overlayClass!="undefined"&&overlayClass){ args.mainClass=escape(overlayClass); } $.magnificPopup.open($.extend(true, {}, theme.mfpConfig, args), 0); }} if($('.porto-modal-trigger.porto-onload').length > 0){ var $obj=$('.porto-modal-trigger.porto-onload').eq(0), timeout=0; if($obj.data('timeout')){ timeout=parseInt($obj.data('timeout'), 10); } setTimeout(function(){ porto_modal_open($obj); }, timeout); } $('.porto-modal-trigger').on('click', function(e){ e.preventDefault(); porto_modal_open($(this)); }); }); $(window).on('load', function(a){ contentBoxInit(); }); $(window).resize(function(a){ contentBoxInit(); }); $(document).ready(function(a){ contentBoxInit(); }); function contentBoxInit(){ $('.porto-ultimate-content-box').each(function(index, el){ var normal_bg_color=$(el).css('background-color')||''; var normal_border_color=$(el).data('border_color')||'transparent'; var normal_box_shadow=$(el).css('box-shadow')||''; var hover_bg_color=$(el).data('hover_bg_color')||$(el).css('background-color'); var hover_border_color=$(el).data('hover_border_color')||'transparent'; var hover_box_shadow=$(el).data('hover_box_shadow')||$(el).css('box-shadow'); $(el).hover(function(){ $(el).css('background-color', hover_bg_color); $(el).css('border-color', hover_border_color); $(el).css('box-shadow', hover_box_shadow); }, function(){ $(el).css('background-color', normal_bg_color); $(el).css('border-color', normal_border_color); $(el).css('box-shadow', normal_box_shadow); }); var rm_o={}; var rm=$(el).data('responsive_margins'); if(typeof rm!='undefined'&&rm!=null){ rm_o=getMargins(rm); } var nm_o={}; var nm=$(el).data('normal_margins'); if(typeof nm!='undefined'&&nm!=null){ nm_o=getMargins(nm); }else{ nm_o=getCssMargins(el); } var WW=$(window).width()||''; if(WW!=''){ if(WW>=768){ applyMargins(nm_o, el); }else{ applyMargins(rm_o, el); }} }); } function getCssMargins(el){ var tmOb={}; tmOb['margin-left']=trimPx($(el).css('margin-left')); tmOb['margin-right']=trimPx($(el).css('margin-right')); tmOb['margin-top']=trimPx($(el).css('margin-top')); tmOb['margin-bottom']=trimPx($(el).css('margin-bottom')); var bs=''; $.each(tmOb, function(index, val){ if(typeof val!='undefined'&&val!=null){ bs +=index+':'+val+'px;'; }}); $(el).attr('data-normal_margins', bs); return tmOb; } function trimPx(l){ var sp; if(typeof l!='undefined'&&l!=null){ sp=l.split('px'); sp=parseInt(sp[0]) } return sp; } function getMargins(mo){ var tmOj={}; var b=mo.split(';'); if(typeof b!='undefined'&&b!=null){ $.each(b, function(index, val){ if(typeof val!=undefined&&val!=null){ var nm=val.split(':'); if(typeof nm[0]!=undefined&&nm[0]!=null&&typeof nm[1]!=undefined&&nm[1]!=null){ switch(nm[0]){ case 'margin':tmOj['margin']=(nm[1]); break; case 'margin-left':tmOj['margin-left']=(nm[1]); break; case 'margin-right':tmOj['margin-right']=(nm[1]); break; case 'margin-top':tmOj['margin-top']=(nm[1]); break; case 'margin-bottom':tmOj['margin-bottom']=(nm[1]); break; }} }}); } return tmOj; } function applyMargins(ob, el){ if(!$.isEmptyObject(ob)){ $.each(ob, function(index, val){ if(typeof val!='undefined'&&val!=null){ $(el).css(index, val); }}); }} $(document).ready(function(){ porto_ibanner(); $(window).on('load', function(){ porto_ibanner(); }); $(window).resize(function(){ porto_ibanner(); }); function porto_ibanner(){ $(".porto-ibanner").each(function(index, element){ $(this).hover(function(){ if($(this).data('hover-opacity')){ $(this).find(".porto-ibanner-img").css("opacity", $(this).data('hover-opacity')); }}, function(){ if($(this).data('opacity')){ $(this).find(".porto-ibanner-img").css("opacity", $(this).data('opacity')); }} ); }); }}); $('.porto-btn[data-hover]').hover(function(){ var hoverColor=$(this).data('hover'); if(hoverColor){ $(this).data('originalColor', $(this).css('color')); $(this).css('color', hoverColor); }}, function(){ var originalColor=$(this).data('originalColor'); if(originalColor){ $(this).css('color', originalColor); }}); $('#footer .widget_wysija .wysija-submit:not(.btn)').addClass('btn btn-default'); if($("[data-vc-parallax] .owl-carousel").length){ setTimeout(function(){ if(typeof window.vcParallaxSkroll=='object'){ window.vcParallaxSkroll.refresh(); }}, 200); } $(".wpcf7-form .wpcf7-submit").on("click",function(e){ if($(this).closest('form').hasClass('processing')){ e.preventDefault(); return false; } $(this).closest('form').addClass("processing") }); $(document).ajaxComplete(function(t,e,i){ $(".wpcf7-form.processing").removeClass("processing"); }); })(window.theme, jQuery); function portoCalcSliderMargin($parent, padding){ $parent.css({ 'margin-left': '-' + padding, 'margin-right': '-' + padding }); } function portoCalcSliderButtonsPosition($parent, padding){ var $buttons=$parent.find('.show-nav-title .owl-nav'); if($buttons.length){ if(window.theme.rtl){ $buttons.css('left', padding); }else{ $buttons.css('right', padding); } if($buttons.closest('.porto-products').length&&$buttons.closest('.porto-products').parent().children('.products-slider-title').length){ var $title=$buttons.closest('.porto-products').parent().children('.products-slider-title'),newMT=$title.offset().top - $parent.offset().top - parseInt($title.css('padding-top'), 10) - parseInt($title.css('line-height'), 10) / 2 + $buttons.children().outerHeight() / 2 - parseInt($buttons.children().css('margin-top'), 10); $buttons.css('margin-top', newMT); }} } function portoCalcSliderTitleLine($parent){ var c_w=$parent.width(); var $title=$parent.parent().find('.slider-title'); if(!$title.length) return; var $l=$title.find('.line'); var $t=$title.find('.inline-title'); if(!$t.length||!$l.length) return; var title_w=$title.width(); var t_w=$t.width(); if(title_w > t_w + 200){ if(window.theme.rtl){ $l.css({ display: 'block', right: t_w + 20, width: title_w - t_w - 75 }); }else{ $l.css({ display: 'block', left: t_w + 20, width: title_w - t_w - 75 }); }}else{ $l.css({ display: 'none' }); }} (function(theme, $){ theme=theme||{}; var instanceName='__wooWidgetToggle'; var WooWidgetToggle=function($el, opts){ return this.initialize($el, opts); }; WooWidgetToggle.defaults={ }; WooWidgetToggle.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, WooWidgetToggle.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper; $el.parent().removeClass('closed'); if(!$el.find('.toggle').length){ $el.append(''); } $el.find('.toggle').click(function(){ if($el.next().is(":visible")){ $el.parent().addClass('closed'); }else{ $el.parent().removeClass('closed'); } $el.next().stop().slideToggle(200); theme.refreshVCContent(); }); return this; }}; $.extend(theme, { WooWidgetToggle: WooWidgetToggle }); $.fn.themeWooWidgetToggle=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.WooWidgetToggle($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__wooWidgetAccordion'; var WooWidgetAccordion=function($el, opts){ return this.initialize($el, opts); }; WooWidgetAccordion.defaults={ }; WooWidgetAccordion.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, WooWidgetAccordion.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper; $el.find('ul.children').each(function(){ var $this=$(this); if(!$this.prev().hasClass('toggle')){ $this.before($('').click(function(){ var $that=$(this); if($that.next().is(":visible")){ $that.parent().removeClass('open').addClass('closed'); }else{ $that.parent().addClass('open').removeClass('closed'); } $that.next().stop().slideToggle(200); theme.refreshVCContent(); }) ); }}); $el.find('li[class*="current-"]').addClass('current'); return this; }}; $.extend(theme, { WooWidgetAccordion: WooWidgetAccordion }); $.fn.themeWooWidgetAccordion=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.WooWidgetAccordion($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var instanceName='__wooProductsSlider'; var WooProductsSlider=function($el, opts){ return this.initialize($el, opts); }; WooProductsSlider.defaults={ rtl: theme.rtl, autoplay:theme.slider_autoplay=='1' ? true:false, autoplayTimeout: theme.slider_speed ? theme.slider_speed:5000, loop: theme.slider_loop, nav: false, navText: ["", ""], dots: false, autoplayHoverPause:true, items:1, responsive:{}, autoHeight:true, lazyLoad: true }; WooProductsSlider.prototype={ initialize: function($el, opts){ if($el.data(instanceName)){ return this; } this.$el=$el; this .setData() .setOptions(opts) .build(); return this; }, setData: function(){ this.$el.data(instanceName, this); return this; }, setOptions: function(opts){ this.options=$.extend(true, {}, WooProductsSlider.defaults, opts, { wrapper: this.$el }); return this; }, build: function(){ var self=this, $el=this.options.wrapper, lg=this.options.lg, md=this.options.md, xs=this.options.xs, ls=this.options.ls, $slider_wrapper=$el.closest('.slider-wrapper'), single=this.options.single, dots=this.options.dots, nav=this.options.nav, responsive={}, items, scrollWidth=theme.getScrollbarWidth(), count=$el.find('> *').length, w_xs=481 - scrollWidth, w_md=768 - scrollWidth, w_lg=992 - scrollWidth, w_xl=theme.screen_lg - scrollWidth, w_sl=1400 - scrollWidth; if($el.find('.product-col').get(0)){ portoCalcSliderMargin($slider_wrapper, $el.find('.product-col').css('padding-left')); portoCalcSliderButtonsPosition($slider_wrapper, $el.find('.product-col').css('padding-left')); } portoCalcSliderTitleLine($slider_wrapper); if(single){ items=1; }else{ items=lg ? lg:1; if(lg) responsive[w_lg]={ items: lg, loop: (this.options.loop&&count > lg) ? true:false }; if(md) responsive[w_md]={ items: md, loop: (this.options.loop&&count > md) ? true:false }; if(xs) responsive[w_xs]={ items: xs, loop: (this.options.loop&&count > xs) ? true:false }; if(ls) responsive[0]={ items: ls, loop: (this.options.loop&&count > ls) ? true:false };} this.options=$.extend(true, {}, this.options, { loop: (this.options.loop&&count > items) ? true:false, items:items, responsive:responsive, onRefresh: function(){ if($el.find('.product-col').get(0)){ portoCalcSliderMargin($slider_wrapper, $el.find('.product-col').css('padding-left')); portoCalcSliderButtonsPosition($slider_wrapper, $el.find('.product-col').css('padding-left')); } portoCalcSliderTitleLine($slider_wrapper); }, onInitialized: function(){ if($el.find('.product-col').get(0)){ portoCalcSliderButtonsPosition($slider_wrapper, $el.find('.product-col').css('padding-left')); }}, touchDrag: (count==1) ? false:true, mouseDrag: (count==1) ? false:true }); if(this.options.autoHeight){ function calcOwlHeight(){ var h=0; $el.find('.owl-item.active').each(function(){ if(h < $(this).height()) h=$(this).height(); }); $el.find('.owl-stage-outer').height(h); } $(window).on('resize', function(){ calcOwlHeight(); }); $(window).on('load', function(){ calcOwlHeight(); }); } $el.owlCarousel(this.options); return this; }}; $.extend(theme, { WooProductsSlider: WooProductsSlider }); $.fn.themeWooProductsSlider=function(opts){ return this.map(function(){ var $this=$(this); if($this.data(instanceName)){ return $this.data(instanceName); }else{ return new theme.WooProductsSlider($this, opts); }}); }}).apply(this, [window.theme, jQuery]); (function(theme, $){ $(function(){ $(document).on('click', '#grid', function(e){ e.preventDefault(); $(this).addClass('active'); $('#list').removeClass('active'); if(($.cookie&&$.cookie('gridcookie')=='list')||!$.cookie){ var $toggle=$('.gridlist-toggle'); if($toggle.length){ var $parent=$toggle.parent().parent(); var $products=$parent.find('ul.products'); $products.fadeOut(300, function(){ $products.addClass('grid').removeClass('list').fadeIn(300); theme.refreshVCContent(); $('ul.products.grid > li.show-outimage-q-onimage .product-inner, ul.products.grid > li.show-links-outimage .product-inner, ul.products.grid > li.show-outimage-q-onimage-alt .product-inner').each(function(){ $(this).children('.product-loop-title').before($(this).children('.rating-wrap')); }); }); }} if($.cookie) $.cookie('gridcookie', 'grid', { path: '/' }); return false; }); $(document).on('click', '#list', function(e){ e.preventDefault(); $(this).addClass('active'); $('#grid').removeClass('active'); if(($.cookie&&$.cookie('gridcookie')=='grid')||!$.cookie){ var $toggle=$('.gridlist-toggle'); if($toggle.length){ var $parent=$toggle.parent().parent(); var $products=$parent.find('ul.products'); $products.fadeOut(300, function(){ $products.addClass('list').removeClass('grid').fadeIn(300); theme.refreshVCContent(); $('ul.products.list > li.show-outimage-q-onimage .product-inner, ul.products.list > li.show-links-outimage .product-inner, ul.products.list > li.show-outimage-q-onimage-alt .product-inner').each(function(){ $(this).children('.product-loop-title').after($(this).children('.rating-wrap')); }); }); }} if($.cookie) $.cookie('gridcookie', 'list', { path: '/' }); return false; }); }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ var $supports_html5_storage; try { $supports_html5_storage=('sessionStorage' in window&&window.sessionStorage!==null); window.sessionStorage.setItem('wc', 'test'); window.sessionStorage.removeItem('wc'); } catch(err){ $supports_html5_storage=false; } var setCartCreationTimestamp=function(){ if($supports_html5_storage){ sessionStorage.setItem('wc_cart_created',(new Date()).getTime()); }}; var setCartHash=function(cart_hash){ if($supports_html5_storage){ localStorage.setItem('wc_cart_hash', cart_hash); sessionStorage.setItem('wc_cart_hash', cart_hash); }}; var initAjaxRemoveCartItem=function(){ $('#mini-cart .cart_list').scrollbar(); $(document).off('click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product').on('click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product', function(e){ e.preventDefault(); var $this=$(this); var cart_id=$this.data("cart_id"); var product_id=$this.data("product_id"); $this.closest('li').find('.ajax-loading').show(); $.ajax({ type: 'POST', dataType: 'json', url: theme.ajax_url, data: { action: "porto_cart_item_remove", cart_id: cart_id }, success: function(response){ var this_page=window.location.toString(), item_count=$(response.fragments['div.widget_shopping_cart_content']).find('.mini_cart_item').length; this_page=this_page.replace('add-to-cart', 'added-to-cart'); updateCartFragment(response); $(document.body).trigger('wc_fragments_refreshed'); $('.viewcart-' + product_id).removeClass('added'); $('.porto_cart_item_' + cart_id).remove(); if(item_count==0&&($('body').hasClass('woocommerce-cart')||$('body').hasClass('woocommerce-checkout'))){ $('.page-content').fadeTo('400', '0.8').block({ message: null, overlayCSS: { opacity: 0.2 }}); }else{ $('.shop_table.cart, .shop_table.review-order, .updating, .cart_totals').fadeTo('400', '0.8').block({ message: null, overlayCSS: { opacity: 0.2 }}); } $('.widget_shopping_cart, .updating').stop(true).css('opacity', '1').unblock(); if(item_count==0&&($('body').hasClass('woocommerce-cart')||$('body').hasClass('woocommerce-checkout'))){ $('.page-content').load(this_page + ' .page-content:eq(0) > *', function(){ $('.page-content').stop(true).css('opacity', '1').unblock(); }); }else{ $('.shop_table.cart').load(this_page + ' .shop_table.cart:eq(0) > *', function(){ $('.shop_table.cart').stop(true).css('opacity', '1').unblock(); }); $('.cart_totals').load(this_page + ' .cart_totals:eq(0) > *', function(){ $('.cart_totals').stop(true).css('opacity', '1').unblock(); }); $('.shop_table.review-order').load(this_page + ' .shop_table.review-order:eq(0) > *', function(){ $('.shop_table.review-order').stop(true).css('opacity', '1').unblock(); }); }} }); return false; }); }; var refreshCartFragment=function(){ initAjaxRemoveCartItem(); if($.cookie('woocommerce_items_in_cart') > 0){ $('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').show(); }else{ $('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').hide(); }}; var updateCartFragment=function(data){ if(data&&data.fragments){ var fragments=data.fragments, cart_hash=data.cart_hash; $.each(fragments, function(key, value){ $(key).replaceWith(value); }); if(typeof wc_cart_fragments_params==='undefined'){ return; } if($supports_html5_storage){ var prev_cart_hash=sessionStorage.getItem('wc_cart_hash'); if(prev_cart_hash===null||prev_cart_hash===undefined||prev_cart_hash===''){ setCartCreationTimestamp(); } sessionStorage.setItem(wc_cart_fragments_params.fragment_name, JSON.stringify(fragments)); setCartHash(cart_hash); }} }; $(function(){ refreshCartFragment(); $(document).on('click', '.add_to_cart_button', function(e){ var $this=$(this); if($this.is('.product_type_simple')){ if($this.attr('data-product_id')){ $this.addClass('product-adding'); } if($this.hasClass('viewcart-style-2')){ $('body').append('
    '); $(this).closest('.product').find('.loader-container').show(); }} }); $(document).on('click', 'span.add_to_cart_button', function(e){ var $this=$(this); if($this.is('.product_type_simple')){ if(!$this.attr('data-product_id')){ window.location.href=$this.attr('href'); }}else{ window.location.href=$this.attr('href'); }}); $('body').bind('added_to_cart', function(){ $('ul.products li.product .added_to_cart').remove(); initAjaxRemoveCartItem(); }); $(document.body).bind('wc_fragments_refreshed wc_fragments_loaded', function(){ refreshCartFragment(); }); $(document).on('click', '.product-image .viewcart, .after-loading-success-message .viewcart', function(e){ var link=$(this).attr('data-link'); window.location.href=link; e.preventDefault(); }); var $msg=''; $(document).on('added_to_cart', 'body', function(event){ $('.add_to_cart_button.product-adding').each(function(){ var $link=$(this); if($link.hasClass('viewcart-style-1')){ $link.removeClass('product-adding'); $link.closest('.product').find('.viewcart').addClass('added'); }else{ $link.removeClass('product-adding'); $('body #loading-mask').remove(); $link.closest('.product').find('.loader-container').hide(); $msg=$link.closest('.product').find('.after-loading-success-message'); $('body').append($msg.clone().show()); setTimeout(function(){ $('body > .after-loading-success-message').remove(); }, 4000); $('.continue_shopping').click(function(){ $('body > .after-loading-success-message').fadeOut(200, function(){ $(this).remove(); });}); }}); }); $(document).on("click", ".variations_form .variations .filter-item-list .filter-color, .variations_form .variations .filter-item-list .filter-item", function(e){ e.preventDefault(); if($(this).closest("ul").next("select").length < 1||$(this).hasClass('disabled')){ return; } var value=unescape($(this).data("value")), selector=$(this).closest("ul").next("select"); if($(this).closest("li").hasClass("active")){ $(this).closest("li").removeClass("active"); selector.children("option:selected").removeAttr("selected"); selector.val(''); }else{ $(this).closest("ul").children("li").removeClass("active"); $(this).closest("li").addClass("active"); selector.children("option:selected").removeAttr("selected"); selector.children("option[value='" + value + "']").attr("selected", "selected"); selector.val(selector.children("option[value='" + value + "']").val()); } selector.change(); }); $(document).on('wc_variation_form', '.variations_form', function(){ if($(this).find(".filter-item-list").length < 1){ return; } $(this).find(".variations select").trigger("focusin"); }); $(document).on('updated_wc_div', function(){ $('.woocommerce-cart-form .porto-lazyload').themePluginLazyLoad(); }); $(document).on('found_variation reset_data', '.variations_form', function(e){ if($(this).find(".filter-item-list").length < 1){ return; } $(this).find(".filter-item-list").each(function(){ if($(this).next("select").length < 1){ return; } var selector=$(this).next("select"), html='', $list=$(this); $list.find('li.active').removeClass('active'); $list.find('.filter-color, .filter-item').removeClass('enabled').removeClass('disabled'); selector.children("option").each(function(){ if(!$(this).val()){ return; } $list.find('[data-value="' + $(this).val() + '"]').addClass('enabled'); if($(this).val()==selector.val()){ $list.find('[data-value="' + $(this).val() + '"]').parent().addClass('active'); } /*html +='"); f[l]=e[l]; e[l] ? (e[l].innerHTML +=k.join(" "), e[l]=e[l].lastChild):(m.innerHTML=k.join(" "), e[l]=m.removeChild(m.firstChild)) }else{ k=document.createElement(a[b].tag); if(a[b].vars)for (n=0; n < a[b].vars.length; n++)k.setAttribute(a[b].vars[n][0], a[b].vars[n][1]); a[b].id&&(k.id=a[b].id); a[b].className&&(k.className=a[b].className); a[b].text&&k.appendChild(document.createTextNode(a[b].text)); f[l]=e[l]; e[l]=e[l] ? e[l].appendChild(k):k } g++||Array.prototype.push.apply(h, e) } j = $.merge(j, e) } return $(h) }, arrVer=function (d, c, a){ for (var j=d.match(/%[^%]*%/g)||[], h=[], e=0; e < c.length; e++){ for (var f=d, m=0; m < j.length; m++)var g=j[m].substr(1, j[m].length - 2), f=f.replace(j[m], c[e][g]); h=$.merge(h, nonArrVer(f, a)) } return $(h) }; $.porto_jseldom=function (d){ if(2==arguments.length&&$.isPlainObject(arguments[1]))return arrVer.apply(this, [arguments[0], [arguments[1]]]); if(1==arguments.length||2==arguments.length&&!$.isArray(arguments[1]))return nonArrVer.apply(this, arguments); if(2==arguments.length)return arrVer.apply(this, arguments) }; var refreshPriceSlider=function(){ var $price_slider=$('.price_slider'); if($price_slider.length){ if(typeof woocommerce_price_slider_params==='undefined'){ return false; } $('input#min_price, input#max_price').hide(); $('.price_slider, .price_label').show(); var min_price=$('.price_slider_amount #min_price').data('min'), max_price=$('.price_slider_amount #max_price').data('max'), current_min_price=parseInt($('.price_slider_amount #min_price').val() ? $('.price_slider_amount #min_price').val():min_price, 10), current_max_price=parseInt($('.price_slider_amount #max_price').val() ? $('.price_slider_amount #max_price').val():max_price, 10); $('.price_slider').slider({ range: true, animate: true, min: min_price, max: max_price, values: [ current_min_price, current_max_price ], create: function(){ $('.price_slider_amount #min_price').val(current_min_price); $('.price_slider_amount #max_price').val(current_max_price); $(document.body).trigger('price_slider_create', [ current_min_price, current_max_price ]); }, slide: function(event, ui){ $('input#min_price').val(ui.values[0]); $('input#max_price').val(ui.values[1]); $(document.body).trigger('price_slider_slide', [ ui.values[0], ui.values[1] ]); }, change: function(event, ui){ $(document.body).trigger('price_slider_change', [ ui.values[0], ui.values[1] ]); }}); } $('.yith-woo-ajax-navigation, .yith-wcan-list-price-filter').removeClass('loading'); }; var categoryAjaxProcess=function(href, updateSelect2){ var shop_before='.shop-loop-before', shop_after='.shop-loop-after', shop_container='.archive-products .products', shop_info='.archive-products .woocommerce-info', $wrapper=$('#content.site-main'); $shop_parent=$(shop_before).parent(), $sticky_sidebar=$('.sidebar [data-plugin-sticky]'), show_toolbar=$(shop_before).data('show'), horizontal_filter='.porto-product-filters:not(.style2)'; if(show_toolbar) $(shop_before + ',' + shop_after).stop(true).fadeTo('400','1').block({message: null, overlayCSS: {opacity: 0.2}}); if($(shop_container).length){ $(shop_container).addClass('yith-wcan-loading'); if(!$(shop_container).children('.porto-loading-icon').length){ $(shop_container).append(''); }}else{ $(shop_info).html('').addClass('yith-wcan-loading products'); if(!$(shop_info).children('.porto-loading-icon').length){ $(shop_info).append(''); }} if($(horizontal_filter).length){ $(horizontal_filter).block({message: null, overlayCSS: {opacity: 0.2}}); } if($sticky_sidebar.get(0)){ theme.refreshStickySidebar(false); } theme.scrolltoContainer(show_toolbar ? $(shop_before):$(shop_container)); $('.yith-woo-ajax-navigation, .yith-wcan-list-price-filter').addClass('loading'); var cart_content, widget_cart; if(widget_cart=$('.sidebar-content .widget_shopping_cart').get(0)){ cart_content=$(widget_cart).html(); } $.ajax({ url:href, data: {portoajax: true}, type: "POST", success: function (response){ var $parent=$(shop_container).parent(), $response=$(response); if($(shop_container).length){ $(shop_container).html(''); } if($sticky_sidebar.get(0)) $shop_parent.css('min-height', 0); if($response.find(shop_container).length){ $parent.html($response.find(shop_container)); }else{ $parent.html($response.find('.woocommerce-info')); $parent.find('.woocommerce-info').addClass('products'); } if($(shop_before + ',' + shop_after).get(0)) $(shop_before + ',' + shop_after).stop(true).css('opacity', '1').unblock(); if($response.find(shop_before).length){ if($(shop_before).length==0){ $.porto_jseldom(shop_before).insertBefore($(shop_container)); } $(shop_before) .html($response.find(shop_before).html()) .show(); }else{ $(shop_before).empty(); } porto_woocommerce_variations_init($parent); if($response.find(horizontal_filter).length){ $(horizontal_filter).html($response.find(horizontal_filter).html()) } $(horizontal_filter).unblock(); if($response.find(shop_after).length){ if($(shop_after).length==0){ $.porto_jseldom(shop_after).insertAfter($(shop_container)); } $(shop_after).html($response.find(shop_after).html()).show(); }else{ $(shop_after).empty(); } if(typeof theme.PostsInfinite!=='undefined'){ theme.PostsInfinite.initialize($(shop_container)); } $('.sidebar-content').each(function(index){ var $this=$(this), $that=$($response.find('.sidebar-content').get(index)); $this.html($that.html()); if(typeof updateSelect2!='undefined'&&updateSelect2){ if(jQuery().selectWoo){ var porto_wc_layered_nav_select=function(){ $this.find('select.woocommerce-widget-layered-nav-dropdown').each(function(){ $(this).selectWoo({ placeholder: $(this).find('option').eq(0).text(), minimumResultsForSearch: 5, width: '100%', allowClear: typeof $(this).attr('multiple')!='undefined'&&$(this).attr('multiple')=='multiple' ? 'false':'true' }); }); }; porto_wc_layered_nav_select(); } $('body').children('span.select2-container').remove(); }}); var $script=$response.filter('script:contains("var woocommerce_price_slider_params")').first(); if($script&&$script.length){ eval($script.text()); window.woocommerce_price_slider_params=woocommerce_price_slider_params; }else{ window.woocommerce_price_slider_params=undefined; } if(!navigator.userAgent.match(/msie/i)){ window.history.pushState({"pageTitle": response.pageTitle}, "", href); } $(document).trigger("yith-wcan-ajax-filtered"); if(widget_cart=$('.sidebar-content .widget_shopping_cart').get(0)){ $('.sidebar-content .widget_shopping_cart').html(cart_content); if($.cookie('woocommerce_items_in_cart') > 0){ $('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').show(); }else{ $('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').hide(); }} }}); }; var categoryAjax=function (){ $('.widget_price_filter').addClass('yith-wcan-list-price-filter'); if(theme.category_ajax){ $('.woocommerce-ordering').off('change', 'select.orderby').on('change', 'select.orderby', function(e){ e.preventDefault(); var $this=$(this), $form=$this.closest('form'), href='?' + $form.serialize(); categoryAjaxProcess(href); }); $('.woocommerce-viewing').off('change', 'select.count').on('change', 'select.count', function(e){ e.preventDefault(); var $this=$(this), $form=$this.closest('form'), href='?' + $form.serialize(); categoryAjaxProcess(href); }); $('.woocommerce-pagination:not(.load-more)').each(function(){ if($(this).closest('.porto-products').length){ return; } $(this).off('click', 'a.page-numbers').on('click', 'a.page-numbers', function(e){ e.preventDefault(); var href=this.href; categoryAjaxProcess(href); }); }); $(document).off('click', '.yith-wcan a').on('click', '.yith-wcan a', function (e){ $(this).yith_wcan_ajax_filters(e, this); }); $('.widget_price_filter .price_slider_wrapper').off('click', '.button').on('click', '.button', function(e){ e.preventDefault(); var $this=$(this), $form=$this.closest('form'), action=$form.attr('action'), href=action + '?' + $form.serialize(), $count=$('.woocommerce-viewing select.count'); if($count.length){ var count=$('.woocommerce-viewing select.count').val(); if(count!=$count.find('option:not([disabled]):first').val()){ href +='&count=' + count; }} $('.widget_price_filter').removeClass('yith-wcan-list-price-filter'); categoryAjaxProcess(href); }); $('.porto_widget_price_filter').off('click', '.button').on('click', '.button', function(e){ e.preventDefault(); var $this=$(this), $form=$this.closest('form'), action=$form.attr('action'), $count=$('.woocommerce-viewing select.count'), hrefArr=$form.serializeArray(), href=action; $.each(hrefArr, function(i, field){ if($.trim(field.value)){ if(action.indexOf('?')==-1&&href==action){ href +='?'; }else{ href +='&'; } href +=(field.name + "=" + $.trim(field.value)); }}); if($count.length){ var count=$('.woocommerce-viewing select.count').val(); if(count!=$count.find('option:not([disabled]):first').val()){ if(href.indexOf('?')==-1){ href +='?count=' + count; }else{ href +='&count=' + count; }} } categoryAjaxProcess(href); }); $('.widget_layered_nav, .widget_rating_filter, .widget_layered_nav_filters').off('click', 'a').on('click', 'a', function(e){ if($(this).hasClass('yit-wcan-select-open')) return; e.preventDefault(); var $this=$(this), href=$this.attr('href'), $count=$('.woocommerce-viewing select.count'); if($count.length){ var count=$('.woocommerce-viewing select.count').val(); if(count!=$count.find('option:not([disabled]):first').val()){ href +='&count=' + count; }} var yith_select=$this.closest('.yith-wcan-select'); if(yith_select.get(0)){ yith_select.parent().css({"opacity":0, "z-index":-1}); } categoryAjaxProcess(href); return false; }); $('.widget_layered_nav select').off('change').on('change', function(e){ e.preventDefault(); var $this=$(this), name=$this.closest('form').find('input[type=hidden]').length ? $this.closest('form').find('input[type=hidden]').attr('name').replace('filter_', ''):$this.attr('class').replace('dropdown_layered_nav_', ''), slug=$this.val(), href, $count=$('.woocommerce-viewing select.count'); href=window.location.href; href=href.replace(/\/page\/\d+/, "").replace("&", '&').replace("%2C", ','); var u=new Url(href); u.query['filtering']=1; u.query['filter_' + name]=slug; if($count.length){ var count=$('.woocommerce-viewing select.count').val(); if(count!=$count.find('option:not([disabled]):first').val()){ u.query['count']=count; }} href=u.toString(); categoryAjaxProcess(href, name); return false; }); }else{ $(document).on('change', '.woocommerce-viewing select.count', function(){ $(this).closest('form').submit(); }); }}; var ajaxFiltered=function(){ var shop_before='.shop-loop-before', shop_after='.shop-loop-after', shop_container='.archive-products .products', $shop_parent=$(shop_before).parent(), $sticky_sidebar=$('.sidebar [data-plugin-sticky]'); if($sticky_sidebar.get(0)){ $shop_parent.css('min-height', 0); } if($(shop_before + ',' + shop_after).get(0)) $(shop_before + ',' + shop_after).stop(true).fadeTo('400','1').unblock(); if($(shop_container).find('.product').get(0)||$(shop_after).closest('.porto-products').length){ $(shop_before + ',' + shop_after).show().data('show', true); }else{ $(shop_before + ',' + shop_after).hide().data('show', false); if($(shop_before).find('.porto-product-filters.style2').length){ $(shop_before).show().data('show', true); }} porto_init(); porto_woocommerce_init(); $('.woocommerce-ordering').off('change', 'select.orderby').on('change', 'select.orderby', function(){ $(this).closest('form').submit(); }); refreshPriceSlider(); categoryAjax(); }; $(function(){ if(typeof yith_wcan!='undefined'){ yith_wcan.container='.archive-products .products'; yith_wcan.pagination='.shop-loop-before'; yith_wcan.result_count='.shop-loop-after'; } $(document).on('click', '.yith-wcan a', function(e){ var shop_before='.shop-loop-before', shop_after='.shop-loop-after', shop_container='.archive-products .products', shop_info='.archive-products .woocommerce-info', $shop_parent=$(shop_before).parent(), $sticky_sidebar=$('.sidebar [data-plugin-sticky]'), show_toolbar=$(shop_before).data('show'); if(show_toolbar) $(shop_before + ',' + shop_after).stop(true).show().fadeTo('400','0.8').block({message: null, overlayCSS: {opacity: 0.2}}); if($(shop_container).length){ $(shop_container).html('').addClass('yith-wcan-loading'); if(!$(shop_container).children('.porto-loading-icon').length){ $(shop_container).append(''); }}else{ $(shop_info).html('').addClass('yith-wcan-loading products'); if(!$(shop_info).children('.porto-loading-icon').length){ $(shop_info).append(''); }} if($sticky_sidebar.get(0)){ theme.refreshStickySidebar(false); } $('.yith-woo-ajax-navigation, .yith-wcan-list-price-filter').addClass('loading'); theme.scrolltoContainer(show_toolbar ? $(shop_before):$(shop_container)); }); $(document).ready(function(){ ajaxFiltered(); }); $(document).on('yith-wcan-ajax-filtered', function(){ ajaxFiltered(); }); if(theme.prdctfltr_ajax){ $(document).on('change', '.woocommerce-viewing select.count', function(){ $(this).closest('form').submit(); }); $(document).on('click', '.woocommerce-pagination:not(.load-more) a.page-numbers', function(e){ theme.scrolltoContainer($('.shop-loop-before')); }); }}); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var duration=300, flag=false; $.extend(theme, { WooProductImageSlider: { defaults: { elements: '.product-image-slider' }, initialize: function($elements){ this.$elements=($elements||$(this.defaults.elements)); this.build(); return this; }, build: function(){ var self=this, thumbs_count=theme.product_thumbs_count; if(theme.product_zoom&&(!('ontouchstart' in document)||(('ontouchstart' in document)&&theme.product_zoom_mobile))){ var zoomConfig={ responsive: true, zoomWindowFadeIn: 200, zoomWindowFadeOut: 100, zoomType: js_porto_vars.zoom_type, cursor: 'grab' }; if(js_porto_vars.zoom_type=='lens'){ zoomConfig.scrollZoom=js_porto_vars.zoom_scroll; zoomConfig.lensSize=js_porto_vars.zoom_lens_size; zoomConfig.lensShape=js_porto_vars.zoom_lens_shape; zoomConfig.containLensZoom=js_porto_vars.zoom_contain_lens; zoomConfig.lensBorderSize=js_porto_vars.zoom_lens_border; zoomConfig.borderColour=js_porto_vars.zoom_border_color; } if(js_porto_vars.zoom_type=='inner'){ zoomConfig.borderSize=0; }else{ zoomConfig.borderSize=js_porto_vars.zoom_border; }} self.$elements.each(function(){ var $this=$(this), $product=$this.closest('.product'), $thumbs_slider=$product.find('.product-thumbs-slider'), $thumbs=$product.find('.product-thumbnails-inner'), $thumbs_vertical_slider=$product.find('.product-thumbs-vertical-slider'), currentSlide=0, count=$this.find('> *').length; $this.find('> *:first-child').waitForImages(true).done(function(){ $thumbs_slider.owlCarousel({ rtl: theme.rtl, loop:false, autoplay:false, items:thumbs_count, nav: false, navText: ["", ""], dots: false, rewind: true, margin: 6, stagePadding: 1, lazyLoad: true, onInitialized: function(){ self.selectThumb(null, $thumbs_slider, 0); if($thumbs_slider.find('.owl-item').length >=thumbs_count) $thumbs_slider.append('
    '); }}).on('click', '.owl-item', function(){ self.selectThumb($this, $thumbs_slider, $(this).index()); }); if($thumbs_vertical_slider.length > 0){ $thumbs_vertical_slider.slick({ dots: false, vertical: true, slidesToShow: thumbs_count > 2 ? thumbs_count - 1:thumbs_count, slidesToScroll: 1 }).on('click', '.img-thumbnail', function(){ self.selectVerticalSliderThumb($this, $thumbs_vertical_slider, $(this).data('slick-index')); }); self.selectVerticalSliderThumb(null, $thumbs_vertical_slider, 0); } self.selectVerticalThumb(null, $thumbs, 0); $thumbs.on('click', '.img-thumbnail', function(){ self.selectVerticalThumb($this, $thumbs, $(this).index()); }); $thumbs_slider.on('click', '.thumb-prev', function(e){ var currentThumb=$thumbs_slider.data('currentThumb'); self.selectThumb($this, $thumbs_slider, --currentThumb); }); $thumbs_slider.on('click', '.thumb-next', function(e){ var currentThumb=$thumbs_slider.data('currentThumb'); self.selectThumb($this, $thumbs_slider, ++currentThumb); }); if(theme.product_image_popup){ var links=[], i=0; $this.find('img').each(function(){ var slide={}; slide.src=$(this).attr('href'); slide.title=$(this).attr('alt'); links[i]=slide; i++; }); } var itemsCount=typeof $this.data('items')!='undefined' ? $this.data('items'):1, itemsResponsive=typeof $this.data('responsive')!='undefined' ? $this.data('responsive'):{}, centerItem=typeof $this.data('centeritem')!='undefined' ? true:false; for (var itemCount in itemsResponsive){ itemsResponsive[itemCount]={ items: itemsResponsive[itemCount] };} $this.owlCarousel({ rtl: theme.rtl, loop:(count > 1) ? true:false, autoplay:false, items:itemsCount, responsive: itemsResponsive, autoHeight:true, nav: true, navText: ["", ""], dots: false, rewind: true, lazyLoad: true, center: centerItem, onInitialized:function(){ if(theme.product_zoom&&(!('ontouchstart' in document)||(('ontouchstart' in document)&&theme.product_zoom_mobile))){ $this.find('img').each(function(){ var $this=$(this); zoomConfig.zoomContainer=$this.parent(); $this.elevateZoom(zoomConfig); }); }}, onTranslate:function(event){ currentSlide=event.item.index - $this.find('.cloned').length / 2; currentSlide=(currentSlide + event.item.count) % event.item.count; self.selectThumb(null, $thumbs_slider, currentSlide); self.selectVerticalThumb(null, $thumbs, currentSlide); self.selectVerticalSliderThumb(null, $thumbs_vertical_slider, currentSlide); var $obj=event.relatedTarget.items(currentSlide).find('img.owl-lazy:not(.owl-lazy-loaded)'); if($obj.length){ var src=$obj.attr('href'), elevateZoom=$obj.data('elevateZoom'), smallImage=$obj.data('src') ? $obj.data('src'):$obj.attr('src'); if(typeof elevateZoom!='undefined'){ elevateZoom.swaptheimage(smallImage, src); }} }, onRefreshed: function(){ if(theme.product_zoom&&(!('ontouchstart' in document)||(('ontouchstart' in document)&&theme.product_zoom_mobile))){ $this.find('img').each(function(){ var $this=$(this), src=typeof $this.attr('href')!='undefined' ? $this.attr('href'):$this.attr('src'), elevateZoom=$this.data('elevateZoom'), smallImage=$this.data('src') ? $this.data('src'):$this.attr('src'); if(typeof elevateZoom!='undefined'){ elevateZoom.startZoom(); elevateZoom.swaptheimage(smallImage, src); }}); }} }); $this.data('links', links); if(theme.product_image_popup){ var $zoom_buttons=$this.next(); $zoom_buttons.off('click').on('click', function(e){ e.preventDefault(); var options={index: currentSlide, event: e}; $.magnificPopup.close(); $.magnificPopup.open($.extend(true, {}, theme.mfpConfig, { items: $this.data('links'), gallery: { enabled: true }, type: 'image' }), currentSlide); }); }}); }); return self; }, selectThumb: function($image_slider, $thumbs_slider, index){ if(flag||!$thumbs_slider.length) return; flag=true; var len=$thumbs_slider.find('.owl-item').length, actives=[], i=0; index=(index + len) % len; if($image_slider){ $image_slider.trigger('to.owl.carousel', [index, duration, true]); } $thumbs_slider.find('.owl-item').removeClass('selected'); $thumbs_slider.find('.owl-item:eq(' + index + ')').addClass('selected'); $thumbs_slider.data('currentThumb', index); $thumbs_slider.find('.owl-item.active').each(function(){ actives[i++]=$(this).index(); }); if($.inArray(index, actives)==-1){ if(Math.abs(index - actives[0]) > Math.abs(index - actives[actives.length - 1])){ $thumbs_slider.trigger('to.owl.carousel', [(index - actives.length + 1) % len, duration, true]); }else{ $thumbs_slider.trigger('to.owl.carousel', [index % len, duration, true]); }} flag=false; }, selectVerticalSliderThumb: function($image_slider, $thumbs_vertical_slider, index){ if(flag||!$thumbs_vertical_slider.length) return; flag=true; var len=$thumbs_vertical_slider[0].slick.slideCount, actives=[], i=0; index=(index + len) % len; if($image_slider){ $image_slider.trigger('to.owl.carousel', [index, duration, true]); } $thumbs_vertical_slider.find('.img-thumbnail').removeClass('selected'); $thumbs_vertical_slider.find('.img-thumbnail:eq(' + index + ')').addClass('selected'); $thumbs_vertical_slider.data('currentThumb', index); $thumbs_vertical_slider.find('.img-thumbnail.slick-active').each(function(){ actives[i++]=$(this).index(); }); if($.inArray(index, actives)==-1){ if(Math.abs(index - actives[0]) > Math.abs(index - actives[actives.length - 1])){ $thumbs_vertical_slider.get(0).slick.goTo((index - actives.length + 1) % len, false); }else{ $thumbs_vertical_slider.get(0).slick.goTo(index % len, false); }} flag=false; }, selectVerticalThumb: function($image_slider, $thumbs, index){ if(flag||!$thumbs.length) return; flag=true; var len=$thumbs.find('.img-thumbnail').length, i=0; index=(index + len) % len; if($image_slider){ $image_slider.trigger('to.owl.carousel', [index, duration, true]); } $thumbs.find('.img-thumbnail').removeClass('selected'); $thumbs.find('.img-thumbnail:eq(' + index + ')').addClass('selected'); $thumbs.data('currentThumb', index); flag=false; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { WooQuickView: { initialize: function(){ this.events(); return this; }, events: function(){ var self=this; $(document).on('click', '.quickview', function(e){ e.preventDefault(); var pid=$(this).attr('data-id'); $.fancybox({ href:theme.ajax_url, ajax:{ data: { action: 'porto_product_quickview', pid: pid }}, type:'ajax', helpers:{ overlay: { locked: true, fixed: true }}, tpl: { error:'

    ' + theme.request_error + '

    ', closeBtn:'', next:'', prev:'' }, autoSize: true, autoWidth:true, afterShow:function(){ setTimeout(function(){ porto_woocommerce_init(); theme.WooProductImageSlider.initialize($('.quickview-wrap-' + pid).find('.product-image-slider')); var form_variation=$('.quickview-wrap-' + pid).find('form.variations_form'); if(form_variation.length > 0){ form_variation.wc_variation_form(); form_variation.find("select option:selected").removeAttr("selected"); }}, 200); }, onUpdate:function(){ setTimeout(function(){ porto_woocommerce_init(); var $slider=$('.quickview-wrap-' + pid).find('.product-image-slider'); if(typeof $slider.data('owl.carousel')!='undefined'&&typeof $slider.data('owl.carousel')._invalidated!='undefined') $slider.data('owl.carousel')._invalidated.width=true; $slider.trigger('refresh.owl.carousel'); }, 300); }}); return false; }); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { WooQtyField: { initialize: function(){ this.build() .events(); return this; }, build: function(){ var self=this; $('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('').prepend(''); $('input.qty:not(.product-quantity input.qty)').each(function(){ var min=parseFloat($(this).attr('min')); if(min&&min > 0&&parseFloat($(this).val()) < min){ $(this).val(min); }}); $('input.qty:not(.product-quantity input.qty)').on('change', function(e){ if($(this).closest('.quantity').next('.add_to_cart_button[data-quantity]').length){ var count=$(this).val(); if(count){ $(this).closest('.quantity').next('.add_to_cart_button[data-quantity]').data('quantity', count); }} }); $(document).off('click', '.plus, .minus').on('click', '.plus, .minus', function(){ var $qty=$(this).closest('.quantity').find('.qty'), currentVal=parseFloat($qty.val()), max=parseFloat($qty.attr('max')), min=parseFloat($qty.attr('min')), step=$qty.attr('step'); if(! currentVal||currentVal===''||currentVal==='NaN') currentVal=0; if(max===''||max==='NaN') max=''; if(min===''||min==='NaN') min=0; if(step==='any'||step===''||step===undefined||parseFloat(step)==='NaN') step=1; if($(this).is('.plus')){ if(max&&(max==currentVal||currentVal > max)){ $qty.val(max); }else{ $qty.val(currentVal + parseFloat(step)); }}else{ if(min&&(min==currentVal||currentVal < min)){ $qty.val(min); }else if(currentVal > 0){ $qty.val(currentVal - parseFloat(step)); }} if($(this).closest('.quantity').next('.add_to_cart_button[data-quantity]').length){ var count=$qty.val(); if(count){ $(this).closest('.quantity').next('.add_to_cart_button[data-quantity]').data('quantity', count); }} $qty.trigger('change'); }); return self; }, events: function(){ var self=this; $(document).ajaxComplete(function(event, xhr, options){ self.build(); }); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; var duration=300; $.extend(theme, { WooVariationForm: { initialize: function(){ this.events(); return this; }, events: function(){ var self=this; $('.variations_form').each(function(){ var $variation_form=$(this), $reset_variations=$variation_form.find('.reset_variations'); if($reset_variations.css('visibility')=='hidden') $reset_variations.hide(); }); $(document).on('check_variations', '.variations_form', function(event, exclude, focus){ var $variation_form=$(this), $reset_variations=$variation_form.find('.reset_variations'); if($reset_variations.css('visibility')=='hidden') $reset_variations.hide(); }); $(document).on('reset_image', '.variations_form', function(event){ var $product=$(this).closest('.product, .product-col'), $product_img=$product.find('div.product-images .woocommerce-main-image'); if($product.hasClass('product-col')){ $product_img=$product.find('div.product-image .inner img:first-child'); } var o_src=$product_img.attr('data-o_src'), o_title=$product_img.attr('data-o_title'), o_href=$product_img.attr('data-o_href'), $thumb_img=$product.find('.woocommerce-main-thumb'), o_thumb_src=$thumb_img.attr('data-o_src'); var $image_slider=$product.find('.product-image-slider'), $thumbs_slider=$product.find('.product-thumbs-slider'); if($image_slider.length){ $image_slider.trigger('to.owl.carousel', [0, duration, true]); } if($thumbs_slider.length){ $thumbs_slider.trigger('to.owl.carousel', [0, duration, true]); $thumbs_slider.find('.owl-item:eq(0)').click(); } var links=$image_slider.data('links'); if(o_src){ $product_img .attr('src', o_src) .attr('srcset', '') .attr('alt', o_title) .attr('href', o_href); $product_img.each(function(){ var elevateZoom=$(this).data('elevateZoom'); if(typeof elevateZoom!='undefined'){ elevateZoom.swaptheimage($(this).attr('src'), $(this).attr('src')); }}); if(typeof links!='undefined'){ links[0].src=o_href; links[0].title=o_title; }} if(o_thumb_src){ $thumb_img.attr('src', o_thumb_src); }}); $(document).on('found_variation', '.variations_form', function(event, variation){ if(typeof variation=='undefined'){ return; } var $product=$(this).closest('.product, .product-col'), $image_slider=$product.find('.product-image-slider').length ? $product.find('.product-image-slider'):$('.single-product .product-image-slider'), $thumbs_slider=$product.find('.product-thumbs-slider'); if($image_slider.length){ $image_slider.trigger('to.owl.carousel', [0, duration, true]); } if($thumbs_slider.length){ $thumbs_slider.trigger('to.owl.carousel', [0, duration, true]); $thumbs_slider.find('.owl-item:eq(0)').click(); } var links=$image_slider.data('links'), $shop_single_image=$product.find('div.product-images .woocommerce-main-image').length ? $product.find('div.product-images .woocommerce-main-image'):$('.single-product div.product-images .woocommerce-main-image'), productimage=$shop_single_image.attr('data-o_src'), imagetitle=$shop_single_image.attr('data-o_title'), imagehref=$shop_single_image.attr('data-o_href'), $shop_thumb_image=$product.find('.woocommerce-main-thumb'), thumbimage=$shop_thumb_image.attr('data-o_src'), variation_image=variation.image_src, variation_link=variation.image_link, variation_title=variation.image_title, variation_thumb=variation.image_thumb; if($product.hasClass('product-col')){ $shop_single_image=$product.find('div.product-image .inner img:first-child'); variation_image=variation.image.thumb_src; } if(! productimage){ productimage=$shop_single_image.attr('data-original') ? $shop_single_image.attr('data-original'):(( ! $shop_single_image.attr('src')) ? '':$shop_single_image.attr('src')); $shop_single_image.attr('data-o_src', productimage); } if(! imagehref){ imagehref=(! $shop_single_image.attr('href')) ? '':$shop_single_image.attr('href'); $shop_single_image.attr('data-o_href', imagehref); } if(! imagetitle){ imagetitle=(! $shop_single_image.attr('alt')) ? '':$shop_single_image.attr('alt'); $shop_single_image.attr('data-o_title', imagetitle); } if(! thumbimage){ thumbimage=$shop_thumb_image.attr('data-original') ? $shop_thumb_image.attr('data-original'):(( ! $shop_thumb_image.attr('src')) ? '':$shop_thumb_image.attr('src')); $shop_thumb_image.attr('data-o_src', thumbimage); } if(variation_image){ $shop_single_image.attr('src', variation_image) $shop_single_image.attr('srcset', '') $shop_single_image.attr('alt', variation_title) $shop_single_image.attr('href', variation_link); $shop_thumb_image.attr('src', variation_thumb); if(typeof links!='undefined'){ links[0].src=variation_link; links[0].title=variation_title; }}else{ $shop_single_image.attr('src', productimage) $shop_single_image.attr('srcset', '') $shop_single_image.attr('alt', imagetitle) $shop_single_image.attr('href', imagehref); $shop_thumb_image.attr('src', thumbimage); if(typeof links!='undefined'){ links[0].src=imagehref; links[0].title=imagetitle; }} $shop_single_image.each(function(){ var elevateZoom=$(this).data('elevateZoom'); if(typeof elevateZoom!='undefined'){ elevateZoom.swaptheimage($(this).attr('src'), $(this).attr('src')); }}); }); return self; }} }); }).apply(this, [window.theme, jQuery]); (function(theme, $){ theme=theme||{}; $.extend(theme, { WooEvents: { initialize: function(){ this.events(); return this; }, events: function(){ var self=this; $('.wcml-switcher li').on('click', function(){ if($(this).parent().attr('disabled')=='disabled') return; var currency=$(this).attr('rel'); self.loadCurrency(currency); }); $('.woocs-switcher li').on('click', function(){ if($(this).parent().attr('disabled')=='disabled') return; var currency=$(this).attr('rel'); self.loadWoocsCurrency(currency); }); return self; }, loadCurrency:function(currency){ $('.wcml-switcher').attr('disabled', 'disabled'); $('.wcml-switcher').append('
  • '); var data={action: 'wcml_switch_currency', currency: currency} $.ajax({ type:'post', url:theme.ajax_url, data:{ action: 'wcml_switch_currency', currency:currency }, success: function(response){ $('.wcml-switcher').removeAttr('disabled'); $('.wcml-switcher').find('.loading').remove(); window.location=window.location.href; }}); }, loadWoocsCurrency:function(currency){ $('.woocs-switcher').attr('disabled', 'disabled'); $('.woocs-switcher').append('
  • '); var l=window.location.href; l=l.split('?'); l=l[0]; var string_of_get='?'; woocs_array_of_get.currency=currency; if(Object.keys(woocs_array_of_get).length > 0){ jQuery.each(woocs_array_of_get, function (index, value){ string_of_get=string_of_get + "&" + index + "=" + value; }); } window.location=l + string_of_get; }, removeParameterFromUrl:function(url, parameter){ return url .replace(new RegExp('[?&]' + parameter + '=[^&#]*(#.*)?$'), '$1') .replace(new RegExp('([?&])' + parameter + '=[^&]*&'), '$1'); }} }); }).apply(this, [window.theme, jQuery]); function porto_woocommerce_init(){ (function($){ 'use strict'; if($.isFunction($.fn['themeWooWidgetToggle'])){ $(function(){ $('.widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter, .porto_widget_price_filter').find('.widget-title').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeWooWidgetToggle(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeWooWidgetAccordion'])){ $(function(){ $('.widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeWooWidgetAccordion(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.isFunction($.fn['themeWooProductsSlider'])){ $(function(){ $('.products-slider:not(.manual)').each(function(){ var $this=$(this), opts; var pluginOptions=$this.data('plugin-options'); if(pluginOptions) opts=pluginOptions; $this.themeWooProductsSlider(opts); }); }); }}).apply(this, [jQuery]); (function($){ 'use strict'; if($.cookie&&$.cookie('gridcookie')){ var $toggle=$('.gridlist-toggle'); if($toggle.get(0)){ var $parent=$toggle.parent().parent(); if($parent.find('ul.products').hasClass('grid')){ $.cookie('gridcookie', 'grid', { path: '/' }); }else if($parent.find('ul.products').hasClass('list')){ $.cookie('gridcookie', 'list', { path: '/' }); }else{ $parent.find('ul.products').addClass($.cookie('gridcookie')); }} } if($.cookie&&$.cookie('gridcookie')=='grid'){ $('.gridlist-toggle #grid').addClass('active'); $('.gridlist-toggle #list').removeClass('active'); $('ul.products.grid > li.show-outimage-q-onimage .product-inner, ul.products.grid > li.show-links-outimage .product-inner, ul.products.grid > li.show-outimage-q-onimage-alt .product-inner').each(function(){ $(this).children('.product-loop-title').before($(this).children('.rating-wrap')); }); } if($.cookie&&$.cookie('gridcookie')=='list'){ $('.gridlist-toggle #list').addClass('active'); $('.gridlist-toggle #grid').removeClass('active'); $('ul.products.list > li.show-outimage-q-onimage .product-inner, ul.products.list > li.show-links-outimage .product-inner, ul.products.list > li.show-outimage-q-onimage-alt .product-inner').each(function(){ $(this).children('.product-loop-title').after($(this).children('.rating-wrap')); }); } if($.cookie&&$.cookie('gridcookie')==null){ var $toggle=$('.gridlist-toggle'); if($toggle.get(0)){ var $parent=$toggle.parent().parent(); $parent.find('ul.products').addClass('grid'); } $('.gridlist-toggle #grid').addClass('active'); if($.cookie) $.cookie('gridcookie', 'grid', { path: '/' }); }}).apply(this, [jQuery]); } function porto_woocommerce_variations_init($parent_obj){ var form_variation=$parent_obj.find('form.variations_form'); if(form_variation.length > 0){ form_variation.each(function(){ jQuery(this).wc_variation_form(); }); }} (function(theme, $){ 'use strict'; $(document).ready(function(){ if(typeof theme.WooQtyField!=='undefined'){ theme.WooQtyField.initialize(); } if(typeof theme.WooQuickView!=='undefined'){ theme.WooQuickView.initialize(); } if(typeof theme.WooEvents!=='undefined'){ theme.WooEvents.initialize(); } if(!('ontouchstart' in document)){ $('.mini-cart').on('hide.bs.dropdown', function (){ return false; }); } $(document).on('tabactivate', '.woocommerce-tabs', function(e, ui){ var label=$(ui).attr('aria-controls'); var panel=$('[aria-labelledby="' + label + '"'); theme.refreshVCContent(panel); }); }); }).apply(this, [window.theme, jQuery]); (function (theme, $, undefined){ "use strict"; if(typeof theme.WooVariationForm!=='undefined'){ theme.WooVariationForm.initialize(); } if(typeof theme.WooProductImageSlider!=='undefined'){ theme.WooProductImageSlider.initialize(); } $(document).ready(function(){ porto_woocommerce_init(); $(window).bind('vc_reload', function(){ porto_woocommerce_init(); $('.type-product').addClass('product'); }); $(document).on('click', '.porto-product-filters-toggle a', function(e){ e.preventDefault(); $(this).closest('.porto-product-filters-toggle').toggleClass('opened'); var $products_wrapper=$(this).closest('#main').find('.main-content').find('ul.products'), offset, $main=$(this).closest('#main').find('.main-content-wrap'); $main.toggleClass('opened'); if($main.hasClass('opened')){ offset=-1; }else{ offset=1; } if($products_wrapper.hasClass('grid')){ var cols_lg_index=0, cols_md_index=0, width_lg_index=0, width_md_index=0; for(var i=1; i <=8; i++){ if(!cols_lg_index&&$products_wrapper.hasClass('pcols-lg-' + i)){ cols_lg_index=i; if(i + offset >=1){ $products_wrapper.removeClass('pcols-lg-' + i); $products_wrapper.addClass('pcols-lg-' + (i + offset)); }} if(!cols_md_index&&$products_wrapper.hasClass('pcols-md-' + i)){ cols_md_index=i; if(i + offset >=1){ $products_wrapper.removeClass('pcols-md-' + i); if(offset===-1){ $products_wrapper.addClass('pcols-sm-' + i); } $products_wrapper.addClass('pcols-md-' + (i + offset)); }} if(!width_lg_index&&$products_wrapper.hasClass('pwidth-lg-' + i)){ width_lg_index=i; if(i + offset >=1){ $products_wrapper.removeClass('pwidth-lg-' + i); $products_wrapper.addClass('pwidth-lg-' + (i + offset)); }} if(!width_md_index&&$products_wrapper.hasClass('pwidth-md-' + i)){ width_md_index=i; if(i + offset >=1){ $products_wrapper.removeClass('pwidth-md-' + i); $products_wrapper.addClass('pwidth-md-' + (i + offset)); }} }} setTimeout(function(){ $(window).trigger('scroll'); }, 300); if($main.hasClass('opened')){ $.cookie('porto_horizontal_filter', 'opened'); }else{ $.cookie('porto_horizontal_filter', 'closed'); } return false; }); if($.cookie&&'opened'==$.cookie('porto_horizontal_filter')&&$('#main .porto-products-filter-body').length&&!theme.isTablet()){ $('.porto-product-filters-toggle a').trigger('click'); $('#main .porto-products-filter-body [data-plugin-sticky]:not(.manual)').addClass('manual'); setTimeout(function(){ var $obj=$('#main .porto-products-filter-body [data-plugin-sticky].manual'), pluginOptions=$obj.data('plugin-options'); $obj.removeClass('manual').themeSticky(pluginOptions); setTimeout(function(){ $(window).trigger('scroll'); }, 100); }, 300); } $(document).on('click', '.porto-product-filters.style2 .widget-title', function(e){ e.preventDefault(); if($(this).next().is(':hidden')){ $('.porto-product-filters.style2 .widget-title').next().hide(); $('.porto-product-filters.style2 .widget').removeClass('opened'); $(this).next().show(); }else{ $(this).next().hide(); } $(this).parent().toggleClass('opened'); return false; }); $('body').on('click', function(e){ if(!$(e.target).is('.porto-product-filters')&&!$(e.target).is('.porto-product-filters *')){ $('.porto-product-filters.style2 .widget-title').next().hide(); $('.porto-product-filters.style2 .widget').removeClass('opened'); }}); $('.login-popup .porto-link-login, .login-popup .porto-link-register').magnificPopup({ items: { src: theme.ajax_url + '?action=porto_account_login_popup', type: 'ajax' }, tLoading: '', callbacks: { ajaxContentAdded: function(){ $(window).trigger('porto_login_popup_opened'); }} }); $('body').on('submit', '#login-form-popup form', function(e){ var $form=$(this), isLogin=$form.hasClass('login'); $form.find('p.status').show().text('Please wait...').addClass('loading'); $form.find('button[type=submit]').attr('disabled', 'disabled'); $.ajax({ type: 'POST', dataType: 'json', url: theme.ajax_url, data: $form.serialize() + '&action=porto_account_login_popup_' + (isLogin ? 'login':'register'), success: function(data){ $form.find('p.status').text(data.message).removeClass('loading'); $form.find('button[type=submit]').removeAttr('disabled'); if(data.loggedin===true){ window.location.reload(); }} }); e.preventDefault(); }); $(document).on('click', '.porto-products.show-category .product-categories a', function(e){ e.preventDefault(); var $this=$(this), $form=$this.closest('.porto-products').find('.pagination-form'); $(this).parent().siblings().removeClass('current'); $(this).parent().addClass('current'); if(typeof $this.data('sort_id')!='undefined'){ $form.find('input[name="orderby"]').val($this.data('sort_id')); $form.find('input[name="category"]').val(''); } if(typeof $this.data('cat_id')!='undefined'){ $form.find('input[name="orderby"]').val($form.find('input[name="original_orderby"]').val()); $form.find('input[name="category"]').val($this.data('cat_id')); } var data=$form.serialize() + '&product-page=1&action=porto_woocommerce_shortcodes_products'; $this.closest('.porto-products').find('ul.products').trigger('porto_update_products', [data, '']); }); $(document).on('click', '.porto-products .page-numbers a', function(e){ var $this=$(this), pagination_style, cur_page=$this.closest('.porto-products').find('ul.products').data('cur_page'), max_page=$this.closest('.porto-products').find('ul.products').data('max_page'), $form=$this.closest('.porto-products').find('.pagination-form'); e.preventDefault(); if($this.closest('.pagination').hasClass('load-more')){ if(!cur_page||!max_page||++cur_page > max_page){ return; } pagination_style='load_more'; $this.data('text', $this.text()); $this.text(js_porto_vars.loader_text); }else{ var url=new RegExp("product-page(=|/)([^(&|/)]*)", "i").exec(this.href); cur_page=url&&unescape(url[2])||""; pagination_style='default'; } var page_var=cur_page ? '&product-page=' + escape(cur_page):'', data=$form.serialize() + page_var + '&action=porto_woocommerce_shortcodes_products'; $this.closest('.porto-products').find('ul.products').trigger('porto_update_products', [data, pagination_style, $this]); }); $(document).on('porto_update_products', 'ul.products', function(e, data, pagination_style, $obj){ var $this=$(this); if('load_more'!=pagination_style){ $this.addClass('yith-wcan-loading'); if(!$this.children('.porto-loading-icon').length){ $this.append(''); }} $.ajax({ url: theme.ajax_url, data: data, type: 'post', success: function(response){ if('load_more'==pagination_style){ $this.append($(response).find('ul.products').html()); }else{ if($this.hasClass('owl-carousel')){ $this.parent().css('min-height', $this.parent().height()); } $this.html($(response).find('ul.products').html()); } if($this.hasClass('owl-carousel')){ $this.trigger('destroy.owl.carousel'); setTimeout(function(){ var pluginOptions=$this.data('plugin-options'), opts; if(pluginOptions) opts=pluginOptions; $this.data('__wooProductsSlider', '').themeWooProductsSlider(opts); $this.parent().css('min-height', ''); }, 100); } if($this.closest('.porto-products').find('.shop-loop-after').length){ if($(response).find('.shop-loop-after').length){ $this.closest('.porto-products').find('.shop-loop-after').replaceWith($(response).find('.shop-loop-after')); }else{ $this.closest('.porto-products').find('.shop-loop-after').remove(); }} if(typeof $this.data('infinitescroll')!='undefined'){ var infinitescrollData=$this.data('infinitescroll'); infinitescrollData.options.state.currPage=1; $this.data('infinitescroll', infinitescrollData); } $this.removeClass('yith-wcan-loading'); if('load_more'==pagination_style&&typeof $obj!='undefined'&&typeof $obj.data('text')!='undefined'){ $obj.text($obj.data('text')); } $(document).trigger("yith-wcan-ajax-filtered"); }}); }); }); $('.porto-onepage-category.show-products .category-section .sub-category').children('.cat-item').addClass('product-col'); $(document).on('click', '.porto-onepage-category .sub-category a', function(e){ var $this=$(this), category, data; category=new RegExp("cat-item-([^(|\")]*)", "i").exec($this.parent().attr('class')); category=category&&unescape(category[1])||""; if(category){ data=$this.closest('.category-details').find('.ajax-form').serialize() + '&action=porto_woocommerce_shortcodes_products&category_description=true&category=' + category; e.preventDefault(); $this.closest('.category-section').find('.woocommerce > ul.products').trigger('porto_update_products', [data, '']); }}); $(window).load(function(){ if($('.porto-onepage-category.show-products').length){ $('body').css('position', 'relative'); $('body').scrollspy({ target: '.porto-onepage-category.show-products .category-list', offset: theme.StickyHeader.sticky_height + theme.adminBarHeight() + theme.sticky_nav_height + 20 }); var previousScrollTop=0, $loadObj; $(window).on('scroll', function(){ if(!$('.porto-onepage-category.show-products.ajax-load .category-section:not(.ajax-loaded)').length){ return; } var currentScrollTop=$(window).scrollTop(); if(previousScrollTop > currentScrollTop){ $loadObj=$('.porto-onepage-category.show-products.ajax-load .category-section:not(.ajax-loaded)').last(); }else{ $loadObj=$('.porto-onepage-category.show-products.ajax-load .category-section:not(.ajax-loaded)').eq(0); } previousScrollTop=$(window).scrollTop(); if(!$loadObj.closest('.porto-onepage-category').hasClass('loading')&&($loadObj.offset().top <=$(window).scrollTop()+$(window).innerHeight()*0.7)){ $loadObj.trigger('porto_load_category_products'); }}); } if($('.single-product .sticky-product').length){ $(window).on('scroll', function(){ var scrollTop=$(window).scrollTop(), offset=theme.adminBarHeight() + theme.StickyHeader.sticky_height; if($('form.cart').offset().top + $('form.cart').height() / 2 <=scrollTop + offset){ $('.single-product .sticky-product').removeClass('hide'); $('.single-product .sticky-product').css('top', offset); }else{ $('.single-product .sticky-product').addClass('hide'); }}); $('.sticky-product .add-to-cart .button').on('click', function(e){ e.preventDefault(); $('.single-product form .single_add_to_cart_button').trigger('click'); }); }}); $(document).on('click', '.porto-onepage-category.show-products .category-list .nav-link', function(e){ var $target=$($(this).attr('href')); if(!$target.length){ return; } e.preventDefault(); if($(this).closest('.porto-onepage-category').hasClass('ajax-load')&&!$target.hasClass('ajax-loaded')){ $target.trigger('porto_load_category_products'); } $target.closest('.porto-onepage-category').addClass('moving'); $('html, body').stop().animate({ scrollTop: $target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 10 }, 600, 'easeOutQuad', function(){ $target.closest('.porto-onepage-category').removeClass('moving'); }); }); $(document).on('porto_load_category_products', '.category-section', function(){ var $target=$(this), cat_id=$target.attr('id').replace('category-', ''); if($target.closest('.porto-onepage-category').hasClass('loading')||$target.closest('.porto-onepage-category').hasClass('moving')||$target.hasClass('ajax-loaded')){ return false; } $target.css('min-height', 200); $target.addClass('yith-wcan-loading'); if(!$target.children('.porto-loading-icon').length){ $target.append(''); } $target.closest('.porto-onepage-category').addClass('loading'); var data=$target.closest('.porto-onepage-category').find('.ajax-form').serialize() + '&action=porto_woocommerce_shortcodes_products&category_description=true&category=' + cat_id; $.ajax({ url: theme.ajax_url, data: data, type: 'post', success: function(response){ $target.addClass('ajax-loaded'); $target.append($(response).html()); $target.removeClass('yith-wcan-loading'); $(document).trigger('yith-wcan-ajax-filtered'); $(window).trigger('resize'); $('body').scrollspy('refresh'); $target.closest('.porto-onepage-category').removeClass('loading'); }}); }); $('.cart-v2 .cart_totals .accordion-toggle.out').removeClass('out'); $(document).ajaxComplete(function(event, xhr, options){ $('.cart-v2 .cart_totals .accordion-toggle.out').each(function(){ if($($(this).attr('href')).length&&$($(this).attr('href')).is(':hidden')){ $(this).removeClass('collapsed'); $($(this).attr('href')).addClass('show'); }}); }); })(window.theme, jQuery); !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);